﻿




using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Linq;
using System.Runtime.Serialization;
using System.Text.RegularExpressions;

namespace Nature
{
	#region Constants
	/// <summary>
    /// Constants
    /// </summary>
	public static partial class Constants
	{ 
		/// <summary>
        /// Angstrom (1.0e-10 [m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The angstrom or ångström  is a unit of length equal to 1/10,000,000,000 (one ten billionth) of a meter (1×10-10 m or 100 pm). Its symbol is the Swedish letter Å.
        /// </remarks>
		public const double Angstrom = 1.0e-10;
		 
		/// <summary>
        /// Standard atmosphere (101325.0 [Pa])
        /// </summary>
		/// <remarks>
		/// wikipedia: The standard atmosphere (symbol: atm) is an international reference pressure defined as 101.325 kPa and formerly used as unit of pressure. For practical purposes it has been replaced by the bar which is 105 Pa. The difference of about 1% is not significant for many applications, and is within the error range of common pressure gauges.
        /// </remarks>
		public const double Atmosphere = 101325.0;
		 
		/// <summary>
        /// Atomic mass unit (unified atomic mass unit) (1.660538921e-27 [kg])
        /// </summary>
		/// <remarks>
		/// wikipedia: The unified atomic mass unit (also known as amu, symbol: u) or dalton (symbol: Da) is the standard unit that is used for indicating mass on an atomic or molecular scale (atomic mass). It is defined as one twelfth of the rest mass of an unbound neutral atom of carbon-12 in its nuclear and electronic ground state, and has a value of 1.660538921(73)×10-27 kg. One dalton is approximately equal to the mass of one proton or one neutron. The CIPM have categorised it as a "non-SI unit" because units values in SI units must be obtained experimentally.
        /// </remarks>
		public const double AtomicMassUnit = 1.660538921e-27;
		 
		/// <summary>
        /// Avogadro's number (6.02214129e+23 [1/mol])
        /// </summary>
		/// <remarks>
		/// wikipedia: In chemistry and physics, the Avogadro constant (symbols: L, NA) is defined as the ratio of the number of constituent particles N (usually atoms or molecules) in a sample to the amount of substance n (unit mole) through the relationship NA = N/n. Thus, it is the proportionality factor that relates the molar mass of an entity, i.e., the mass per amount of substance, to the mass of said entity. The Avogadro constant expresses the number of elementary entities per mole of substance and it has the value 6.02214129(27)×1023 mol-1. Changes in the SI units are proposed that will change Avogadro's constant to exactly 6.02214X×1023 when it is expressed in the unit mol-1 (see New SI definitions).
        /// </remarks>
		public const double Avogadro = 6.02214129e+23;
		 
		/// <summary>
        /// Bohr magneton (9.27400968e-24 [J/T])
        /// </summary>
		/// <remarks>
		/// wikipedia: In atomic physics, the Bohr magneton (symbol µB) is a physical constant and the natural unit for expressing an electron magnetic dipole moment
        /// </remarks>
		public const double BohrMagneton = 9.27400968e-24;
		 
		/// <summary>
        /// Bohr radius (5.2917721092e-11 [m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Bohr radius is a physical constant, approximately equal to the most probable distance between the proton and electron in a hydrogen atom in its ground state. It is named after Niels Bohr, due to its role in the Bohr model of an atom.
        /// </remarks>
		public const double BohrRadius = 5.2917721092e-11;
		 
		/// <summary>
        /// Boltzmann constant (1.3806488e-23 [J/K])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Boltzmann constant (k or kB) is the physical constant relating energy at the individual particle level with temperature, which must necessarily be observed at the collective or bulk level
        /// </remarks>
		public const double Boltzmann = 1.3806488e-23;
		 
		/// <summary>
        /// Characteristic impedance of vacuum (376.730313461 [V/A])
        /// </summary>
		/// <remarks>
		/// wikipedia: The impedance of free space, Z0, is a physical constant relating the magnitudes of the electric and magnetic fields of electromagnetic radiation travelling through free space. That is, Z0 = |E|/|H|, where |E| is the electric field strength and |H| magnetic field strength. It has an exact value, given approximately as 376.73031... ohms.
        /// </remarks>
		public const double CharacteristicImpedanceOfVacuum = 376.730313461;
		 
		/// <summary>
        /// Classical electron radius (2.8179403267e-15 [m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The classical electron radius, also known as the Lorentz radius or the Thomson scattering length, is based on a classical (i.e., non-quantum) relativistic model of the electron.
        /// </remarks>
		public const double ClassicalElectronRadius = 2.8179403267e-15;
		 
		/// <summary>
        /// Conductance quantum (7.7480917346e-5 [S])
        /// </summary>
		/// <remarks>
		/// wikipedia: The conductance quantum (G0) is the quantized unit of electrical conductance. It appears when measuring the conductance of a quantum point contact, and, more generally, is a key component of Landauer formula which relates the electrical conductance of a quantum conductor to its quantum properties.
        /// </remarks>
		public const double ConductanceQuantum = 7.7480917346e-5;
		 
		/// <summary>
        /// Conventional value of Josephson constant (4.835979e14 [Hz/V])
        /// </summary>
		/// <remarks>
		/// wikipedia: The magnetic flux quantum F0 is the quantum of magnetic flux passing through a superconductor. The phenomenon of flux quantization was discovered by B. S. Deaver and W. M. Fairbank and, independently, by R. Doll and M. Nabauer, in 1961. The quantization of magnetic flux is closely related to the Little–Parks effect, but was predicted earlier by Fritz London in 1948 using a phenomenological model.
        /// </remarks>
		public const double ConventionalValueOfJosephsonConstant = 4.835979e14;
		 
		/// <summary>
        /// Conventional value of von Klitzing constant (25812.807 [V/A])
        /// </summary>
		/// <remarks>
		/// wikipedia: The quantum Hall effect (or integer quantum Hall effect) is a quantum-mechanical version of the Hall effect, observed in two-dimensional electron systems subjected to low temperatures and strong magnetic fields, in which the Hall conductivity s takes on the quantized values
        /// </remarks>
		public const double ConventionalValueOfVonKlitzingConstant = 25812.807;
		 
		/// <summary>
        /// Coulomb's constant (8.987551787e+9 [N*m^2/C^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: Coulomb's law states that: "The magnitude of the Electrostatics force of interaction between two point charges is directly proportional to the scalar multiplication of the magnitudes of charges and inversely proportional to the square of the distances between them."
        /// </remarks>
		public const double Coulomb = 8.987551787e+9;
		 
		/// <summary>
        /// Debye (3.162e-25 [(J*m^3)^(1/2)])
        /// </summary>
		/// <remarks>
		/// wikipedia: The debye (symbol: D) is a CGS unit (a non-SI metric unit) of electric dipole moment named in honour of the physicist Peter J. W. Debye. It is defined as 1×10-18 statcoulomb-centimetre. Historically the debye was defined as the dipole moment resulting from two charges of opposite sign but an equal magnitude of 10-10 statcoulomb (generally called e.s.u. (electrostatic unit) in older literature), which were separated by 1 ångström.
        /// </remarks>
		public const double Debye = 3.162e-25;
		 
		/// <summary>
        /// Electric constant (vacuum permittivity) (8.854187817e-12 [F/m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The physical constant e0, commonly called the vacuum permittivity, permittivity of free space or electric constant is an ideal, (baseline) physical constant, which is the value of the absolute (not relative) dielectric permittivity of classical vacuum
        /// </remarks>
		public const double ElectricConstant = 8.854187817e-12;
		 
		/// <summary>
        /// Electron mass (9.10938291e-31 [kg])
        /// </summary>
		/// <remarks>
		/// wikipedia: The electron (symbol: e-) is a subatomic particle with a negative elementary electric charge
        /// </remarks>
		public const double ElectronMass = 9.10938291e-31;
		 
		/// <summary>
        /// Elementary charge (1.602176565e-19 [C])
        /// </summary>
		/// <remarks>
		/// wikipedia: The elementary charge, usually denoted as e, is the electric charge carried by a single proton, or equivalently, the negation (opposite) of the electric charge carried by a single electron. This elementary charge is a fundamental physical constant. To avoid confusion over its sign, e is sometimes called the elementary positive charge. This charge has a measured value of approximately 1.602176565(35)×10-19 coulombs. In the cgs system, e is 4.80320425(10)×10-10 statcoulombs
        /// </remarks>
		public const double ElementaryCharge = 1.602176565e-19;
		 
		/// <summary>
        /// Faraday constant (96485.3365 [C/mol])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics and chemistry, the Faraday constant (named after Michael Faraday) is the magnitude of electric charge per mole of electrons. It has the currently accepted value F = 96,485.3365(21) C/mol
        /// </remarks>
		public const double Faraday = 96485.3365;
		 
		/// <summary>
        /// Fermi coupling constant (1.166364e-5 [Ge/V^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: In particle physics, Fermi's interaction is an explanation of the beta decay, proposed by Enrico Fermi, in which four fermions directly interact with one another at one vertex. For example, this interaction explains beta decay of a neutron by direct coupling of a neutron with an electron, antineutrino and a proton
        /// </remarks>
		public const double FermiCouplingConstant = 1.166364e-5;
		 
		/// <summary>
        /// Fine-structure constant (7.2973525698e-3 [~])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics, the fine-structure constant (usually denoted a, the Greek letter alpha) is a fundamental physical constant, namely the coupling constant characterizing the strength of the electromagnetic interaction. Being a dimensionless quantity, it has constant numerical value in all systems of units. Arnold Sommerfeld introduced the fine-structure constant in 1916
        /// </remarks>
		public const double FineStructureConstant = 7.2973525698e-3;
		 
		/// <summary>
        /// First radiation constant (3.74177153e-16 [W*m^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: A constant appearing in the Planck radiation formula; its value depends on the form of the formula used; in the formula for power emitted by a blackbody per unit area per unit wavelength interval, it is 2p times Planck's constant, times the square of the speed of light, or approximately 3.74177 × 10-16 watt (meter)2. Symbolized c1; C1. 
        /// </remarks>
		public const double FirstRadiationConstant = 3.74177153e-16;
		 
		/// <summary>
        /// Hartree energy (4.35974434e-18 [J])
        /// </summary>
		/// <remarks>
		/// wikipedia: The hartree (symbol: Eh or Ha), also known as the Hartree energy, is the atomic unit of energy, named after the British physicist Douglas Hartree. It is defined as 2R8hc, where R8 is the Rydberg constant, h is the Planck constant and c is the speed of light. The 2010 CODATA recommended value is Eh = 4.359?744?34(19)×10-18 J= 27.211?385?05(60) eV.The 2006 CODATA recommended value was Eh = 4.359?743?94 (22)×10-18 J = 27.211?383?86(68) eV.
        /// </remarks>
		public const double HartreeEnergy = 4.35974434e-18;
		 
		/// <summary>
        /// International Steam Table calorie (1929) (4.1868 [J])
        /// </summary>
		/// <remarks>
		/// wikipedia: 1/860 international watt hours = 180/43 international joules exactly
        /// </remarks>
		public const double InternationalSteamTableCalorie1929 = 4.1868;
		 
		/// <summary>
        /// International Steam Table calorie (1956) (4.1868 [J])
        /// </summary>
		/// <remarks>
		/// wikipedia: The 5th International Conference on the Properties of Steam (London, July 1956) adopted a set of mechanical equivalents to thermal units, now identified by the abbreviation IT or IST (International [Steam] Tables), which made 1 Btu/lb exactly equal to 2326 J/kg.  One kilocalorie per kilogram is 1.8 times this ratio, because there are 1.8°F in 1°C (this factor applies to ideal units although the actual energy needed to raise a given mass of water, say, 10°C may be slightly different from 1.8 times what's needed to raise it 10°F).  An IT calorie is thus exactly 4.1868 J.  When the avoirdupois pound was finally defined in metric terms as exactly 0.45359237 kg  (effective January 1, 1959), the IT Btu became equal to exactly 1055.05585262 J (namely, 2326 J times the ratio of the pound to the kilogram).  The rarely used "centigrade heat unit" (chu) is 1.8 Btu.
        /// </remarks>
		public const double InternationalSteamTableCalorie1956 = 4.1868;
		 
		/// <summary>
        /// IUNS calorie (4.182 [J])
        /// </summary>
		/// <remarks>
		/// wikipedia: This is a ratio adopted by the Committee on Nomenclature of the International Union of Nutritional Sciences
        /// </remarks>
		public const double IUNScalorie = 4.182;
		 
		/// <summary>
        /// Josephson constant (4.83597870e+14 [Hz/V])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Josephson effect is the phenomenon of supercurrent — i.e. a current that flows indefinitely long without any voltage applied — across a device known as a Josephson junction (JJ), which consists of two superconductors coupled by a weak link. The weak link can consist of a thin insulating barrier (known as a superconductor–insulator–superconductor junction, or S-I-S), a short section of non-superconducting metal (S-N-S), or a physical constriction that weakens the superconductivity at the point of contact (S-s-S).
        /// </remarks>
		public const double Josephson = 4.83597870e+14;
		 
		/// <summary>
        /// Loschmidt constant (2.6867805e+25 [1/M^3])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Loschmidt constant or Loschmidt's number (symbol: n0) is the number of particles (atoms or molecules) of an ideal gas in a given volume (the number density). It is usually quoted at standard temperature and pressure, and the 2006 CODATA recommended value is 2.686 7774(47)×1025 per cubic metre at 0 °C and 1 atm. It is named after the Austrian physicist Johann Josef Loschmidt, who was the first to estimate the physical size of molecules in 1865. The term "Loschmidt constant" is also sometimes (incorrectly) used to refer to the Avogadro constant, particularly in German texts.
        /// </remarks>
		public const double Loschmidt = 2.6867805e+25;
		 
		/// <summary>
        /// Magnetic constant (vacuum permeability) 4p × 10-7 N·A-2 = 1.256 637 061... × 10-6 N·A-2 (1.256637061e-6 [H/m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The physical constant µ0, commonly called the vacuum permeability, permeability of free space, or magnetic constant is an ideal, (baseline) physical constant, which is the value of magnetic permeability in a classical vacuum. Vacuum permeability is derived from production of a magnetic field by an electric current or by a moving electric charge and in all other formulas for magnetic-field production in a vacuum. In the reference medium of classical vacuum, µ0 has an exact defined value
        /// </remarks>
		public const double MagneticConstant = 1.256637061e-6;
		 
		/// <summary>
        /// Magnetic flux quantum (2.067833758e-15 [Wb])
        /// </summary>
		/// <remarks>
		/// wikipedia: The magnetic flux quantum F0 is the quantum of magnetic flux passing through a superconductor. The phenomenon of flux quantization was discovered by B. S. Deaver and W. M. Fairbank and, independently, by R. Doll and M. Nabauer, in 1961. The quantization of magnetic flux is closely related to the Little–Parks effect, but was predicted earlier by Fritz London in 1948 using a phenomenological model.
        /// </remarks>
		public const double MagneticFluxQuantum = 2.067833758e-15;
		 
		/// <summary>
        /// Default URI of the Nature Data Services hosted on the local machine ("net.pipe://localhost/Nature")
        /// </summary>
		/// <remarks>
		/// wikipedia: Default URI of the Nature Data Services hosted on the local machine
        /// </remarks>
		public const string NatureLocalHostUri = "net.pipe://localhost/Nature";
		 
		/// <summary>
        /// Newtonian constant of gravitation (6.67384e-11 [m3/kg/s^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: The gravitational constant denoted by letter G, is an empirical physical constant involved in the calculation(s) of gravitational force between two bodies. It usually appears in Sir Isaac Newton's law of universal gravitation, and in Albert Einstein's theory of general relativity. It is also known as the universal gravitational constant, Newton's constant, and colloquially as Big G. It should not be confused with "little g" (g), which is the local gravitational field (equivalent to the free-fall acceleration), especially that at the Earth's surface.
        /// </remarks>
		public const double NewtonianConstantOfGravitation = 6.67384e-11;
		 
		/// <summary>
        /// Nuclear magneton (5.05078353e-27 [J/T])
        /// </summary>
		/// <remarks>
		/// wikipedia: physical constant of magnetic moment
        /// </remarks>
		public const double NuclearMagneton = 5.05078353e-27;
		 
		/// <summary>
        /// Planck charge (1.875545956e-18 [C])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics, the Planck charge, denoted by , is one of the base units in the system of natural units called Planck units. It is a quantity of electric charge defined in terms of fundamental physical constants.
        /// </remarks>
		public const double PlanckCharge = 1.875545956e-18;
		 
		/// <summary>
        /// Planck constant (6.62606957e-34 [J*s])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Planck constant (denoted h, also called Planck's constant) is a physical constant reflecting the sizes of energy quanta in quantum mechanics. It is named after Max Planck, one of the founders of quantum theory, who discovered it in 1900. Classical statistical mechanics requires the existence of h (but does not define its value). The Planck constant was first described as the proportionality constant between the energy (E) of a photon and the frequency (?) of its associated electromagnetic wave.
        /// </remarks>
		public const double PlanckConstant = 6.62606957e-34;
		 
		/// <summary>
        /// Planck length (1.616199e-35 [m])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics, the Planck length, denoted lP, is a unit of length, equal to 1.616199(97)×10-35 metres. It is a base unit in the system of Planck units. The Planck length can be defined from three fundamental physical constants: the speed of light in a vacuum, Planck's constant, and the gravitational constant.
        /// </remarks>
		public const double PlanckLength = 1.616199e-35;
		 
		/// <summary>
        /// Planck mass (2.17651e-8 [kg])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics, the Planck mass, denoted by mP, is the unit of mass in the system of natural units known as Planck units.
        /// </remarks>
		public const double PlanckMass = 2.17651e-8;
		 
		/// <summary>
        /// Planck temperature (1.416833e32 [K])
        /// </summary>
		/// <remarks>
		/// wikipedia: serves as the defining unit of the Planck temperature scale. In this scale the magnitude of the Planck temperature is equal to 1, while that of absolute zero is 0. Other temperatures can be converted to Planck temperature units. For example, 0°C = 273.15K = 1.9279 × 10-30TP.
        /// </remarks>
		public const double PlanckTemperature = 1.416833e32;
		 
		/// <summary>
        /// Planck time (5.39106e-44 [s])
        /// </summary>
		/// <remarks>
		/// wikipedia: In physics, the Planck time, (tP), is the unit of time in the system of natural units known as Planck units. It is the time required for light to travel, in a vacuum, a distance of 1 Planck length. The unit is named after Max Planck, who was the first to propose it.
        /// </remarks>
		public const double PlanckTime = 5.39106e-44;
		 
		/// <summary>
        /// Proton mass (1.672621777e-27 [kg])
        /// </summary>
		/// <remarks>
		/// wikipedia: The proton is a subatomic particle with the symbol p or p+ and a positive electric charge of 1 elementary charge. One or more protons are present in the nucleus of each atom, along with neutrons. The number of protons in each atom is its atomic number. The name proton was given to the hydrogen nucleus by Ernest Rutherford in 1920, because in previous years he had discovered that the hydrogen nucleus (known to be the lightest nucleus) could be extracted from the nuclei of nitrogen by collision, and was thus a candidate to be a fundamental particle and building block of nitrogen and all other heavier atomic nuclei.
        /// </remarks>
		public const double ProtonMass = 1.672621777e-27;
		 
		/// <summary>
        /// Reduced Planck constant (1.054571726e-34 [J*s])
        /// </summary>
		/// <remarks>
		/// wikipedia: hr=h/2Pi The Planck constant (denoted h, also called Planck's constant) is a physical constant reflecting the sizes of energy quanta in quantum mechanics. It is named after Max Planck, one of the founders of quantum theory, who discovered it in 1900. Classical statistical mechanics requires the existence of h (but does not define its value). The Planck constant was first described as the proportionality constant between the energy (E) of a photon and the frequency (?) of its associated electromagnetic wave.
        /// </remarks>
		public const double ReducedPlanckConstant = 1.054571726e-34;
		 
		/// <summary>
        /// Gas constant (8.3144621 [J/K/mol])
        /// </summary>
		/// <remarks>
		/// wikipedia: The gas constant (also known as the molar, universal, or ideal gas constant, denoted by the symbol R or R) is a physical constant which is featured in many fundamental equations in the physical sciences, such as the ideal gas law and the Nernst equation. It is equivalent to the Boltzmann constant, but expressed in units of energy (i.e. the pressure-volume product) per temperature increment per mole (rather than energy per temperature increment per particle). The constant is also a combination of the constants from Boyle's Law, Charles' Law, Avogadro's Law, and Gay-Lussac's Law.
        /// </remarks>
		public const double Rgas = 8.3144621;
		 
		/// <summary>
        /// Rydberg constant (10973731.568539 [1/m])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Rydberg constant, symbol R8 or RH, named after the Swedish physicist Johannes Rydberg, is a physical constant relating to atomic spectra, in the science of spectroscopy. The constant first arose as an empirical fitting parameter in the Rydberg formula for the hydrogen spectral series, but Niels Bohr later showed that its value could be calculated from more fundamental constants, explaining the relationship via his "Bohr model". As of 2010, R8 is the most accurately measured fundamental physical constant. The Rydberg constant represents the limiting value of the highest wavenumber (the inverse wavelength) of any photon that can be emitted from the hydrogen atom, or, alternatively, the wavenumber of the lowest-energy photon capable of ionizing the hydrogen atom from its ground state. The spectrum of hydrogen can be expressed simply in terms of the Rydberg constant, using the Rydberg formula.
        /// </remarks>
		public const double Rydberg = 10973731.568539;
		 
		/// <summary>
        /// Sackur-Tetrode constant (=1 K and =101.325 kPa) (-1.1648708 [~])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Sackur–Tetrode equation is an expression for the entropy of a monatomic classical ideal gas which incorporates quantum considerations which give a more detailed description of its regime of validity. The Sackur–Tetrode equation is named for Hugo Martin Tetrode (1895–1931) and Otto Sackur (1880–1914), who developed it independently as a solution of Boltzmann's gas statistics and entropy equations, at about the same time in 1912.
        /// </remarks>
		public const double SackurTetrode = -1.1648708;
		 
		/// <summary>
        /// Second radiation constant (1.4387770e-2 [m*K])
        /// </summary>
		/// <remarks>
		/// wikipedia: A constant appearing in the Planck radiation formula, equal to the speed of light times Planck's constant divided by Boltzmann's constant, or approximately 1.4388 degree-centimeters. Symbolized c2; C2. 
        /// </remarks>
		public const double SecondRadiationConstant = 1.4387770e-2;
		 
		/// <summary>
        /// Speed of light in vacuum (299792458.0 [m/s])
        /// </summary>
		/// <remarks>
		/// wikipedia: The speed of light in vacuum, usually denoted by c, is a universal physical constant important in many areas of physics. Its value is 299,792,458 metres per second, a figure that is exact because the length of the metre is defined from this constant and the international standard for time. In imperial units this speed is approximately 186,282 miles per second.
        /// </remarks>
		public const double SpeedOfLightInVacuum = 299792458.0;
		 
		/// <summary>
        /// Standard acceleration of gravity (9.80665 [m/s^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: Gravitation, or gravity, is a natural phenomenon by which physical bodies attract with a force proportional to their masses. Gravitation is most familiar as the agent that gives weight to objects with mass and causes them to fall to the ground when dropped. Gravitation causes dispersed matter to coalesce, and coalesced matter to remain intact, thus accounting for the existence of the Earth, the Sun, and most of the macroscopic objects in the universe.
        /// </remarks>
		public const double StandardAccelerationOfGravity = 9.80665;
		 
		/// <summary>
        /// Stefan–Boltzmann constant (5.670373e-8 [W/m^2/K^4])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Stefan–Boltzmann constant (also Stefan's constant), a physical constant denoted by the Greek letter s, is the constant of proportionality in the Stefan–Boltzmann law: the total energy radiated per unit surface area of a black body in unit time is proportional to the fourth power of the thermodynamic temperature
        /// </remarks>
		public const double StefanBoltzmann = 5.670373e-8;
		 
		/// <summary>
        /// Thermochemical calorie (4.184 [J])
        /// </summary>
		/// <remarks>
		/// wikipedia:  In 1935, the thermochemical calorie was defined as exactly equal to 4.184 J. Historically, the calorie used to be defined as the energy needed to raise a gram of water by 1°C, just like the Btu (British thermal unit) was the energy to raise a pound of water by 1°F.  Such definitions depend on the initial temperature and thus gave rise to a multiplicity of units with the same name.  Also, using a finite increase in temperature (like 1°C or 1°F) in either definition made the factor of 1.8 reflect only approximately the effect of switching from the Fahrenheit to the Celsius scale (the factor is exact for the slopes of the relevant curves, or for equal temperature increments, not for different finite increments, no matter how small).  This is why the calorie is now defined precisely with the above mechanical equivalent in joules.  Unfortunately, this definition competes with the 1956 IST definition discussed below.  The trend seems to be that, unless otherwise specified, the calorie is to be understood as having the above thermochemical definition, whereas the Btu has the IST definition given in the following note. 
        /// </remarks>
		public const double ThermochemicalCalorie = 4.184;
		 
		/// <summary>
        /// Thomson cross section (6.652458734e-29 [m^2])
        /// </summary>
		/// <remarks>
		/// wikipedia: A cross section is the effective area which governs the probability of some scattering or absorption event. Together with particle density and path length, it can be used to predict the total scattering probability via the Beer-Lambert law. In nuclear and particle physics, the concept of a cross section is used to express the likelihood of interaction between particles. When particles in a beam are thrown against a foil made of a certain substance, the cross section  is a hypothetical area measure around the target particles of the substance (usually its atoms) that represents a surface. If a particle of the beam crosses this surface, there will be some kind of interaction.
        /// </remarks>
		public const double ThomsonCrossSection = 6.652458734e-29;
		 
		/// <summary>
        /// Von Klitzing constant (25812.8074434 [V/A])
        /// </summary>
		/// <remarks>
		/// wikipedia: The quantum Hall effect (or integer quantum Hall effect) is a quantum-mechanical version of the Hall effect, observed in two-dimensional electron systems subjected to low temperatures and strong magnetic fields, in which the Hall conductivity s takes on the quantized values
        /// </remarks>
		public const double VonKlitzing = 25812.8074434;
		 
		/// <summary>
        /// Weak mixing angle (0.2223 [~])
        /// </summary>
		/// <remarks>
		/// wikipedia: The Weinberg angle or weak mixing angle is a parameter in the Weinberg–Salam theory of the electroweak interaction, and is usually denoted as ?W. It is the angle by which spontaneous symmetry breaking rotates the original W0 and B0 vector boson plane, producing as a result the Z0 boson, and the photon.
        /// </remarks>
		public const double WeakMixingAngle = 0.2223;
		 
		/// <summary>
        /// Wien displacement law constant (2.8977721e-3 [m*K])
        /// </summary>
		/// <remarks>
		/// wikipedia: Wien's displacement law states that the wavelength distribution of thermal radiation from a black body at any temperature has essentially the same shape as the distribution at any other temperature, except that each wavelength is displaced on the graph. Apart from an overall T3 multiplicative factor, the average thermal energy in each mode with frequency  only depends on the ratio . Restated in terms of the wavelength , the distributions at corresponding wavelengths are related, where corresponding wavelengths are at locations proportional to . Blackbody radiation approximates to Wien's law at high frequency.
        /// </remarks>
		public const double WienDisplacementLawConstant = 2.8977721e-3;
		 
	}

	public static partial class ChemicalElementMass
	{  
		/// <summary>
        /// Hydrogen (0.00100794 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "H", name: "Hydrogen", mass: 0.00100794)]
		public const double H = 0.00100794;  
		/// <summary>
        /// Deuterium (0.002014101778 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "D", name: "Deuterium", mass: 0.002014101778)]
		public const double D = 0.002014101778;  
		/// <summary>
        /// Helium (0.004002602 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "HE", name: "Helium", mass: 0.004002602)]
		public const double HE = 0.004002602;  
		/// <summary>
        /// Lithium (0.006941 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "LI", name: "Lithium", mass: 0.006941)]
		public const double LI = 0.006941;  
		/// <summary>
        /// Beryllium (0.009012182 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "BE", name: "Beryllium", mass: 0.009012182)]
		public const double BE = 0.009012182;  
		/// <summary>
        /// Boron (0.010811 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "B", name: "Boron", mass: 0.010811)]
		public const double B = 0.010811;  
		/// <summary>
        /// Carbon (0.012011 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "C", name: "Carbon", mass: 0.012011)]
		public const double C = 0.012011;  
		/// <summary>
        /// Nitrogen (0.01400674 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "N", name: "Nitrogen", mass: 0.01400674)]
		public const double N = 0.01400674;  
		/// <summary>
        /// Oxygen (0.0159994 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "O", name: "Oxygen", mass: 0.0159994)]
		public const double O = 0.0159994;  
		/// <summary>
        /// Fluorine (0.0189984 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "F", name: "Fluorine", mass: 0.0189984)]
		public const double F = 0.0189984;  
		/// <summary>
        /// Neon (0.0201797 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "NE", name: "Neon", mass: 0.0201797)]
		public const double NE = 0.0201797;  
		/// <summary>
        /// Sodium (0.02298977 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "NA", name: "Sodium", mass: 0.02298977)]
		public const double NA = 0.02298977;  
		/// <summary>
        /// Magnesium (0.024305 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "MG", name: "Magnesium", mass: 0.024305)]
		public const double MG = 0.024305;  
		/// <summary>
        /// Aluminum (0.02698154 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AL", name: "Aluminum", mass: 0.02698154)]
		public const double AL = 0.02698154;  
		/// <summary>
        /// Silicon (0.0280855 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SI", name: "Silicon", mass: 0.0280855)]
		public const double SI = 0.0280855;  
		/// <summary>
        /// Phosphorus (0.03097376 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "P", name: "Phosphorus", mass: 0.03097376)]
		public const double P = 0.03097376;  
		/// <summary>
        /// Sulfur (0.032066 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "S", name: "Sulfur", mass: 0.032066)]
		public const double S = 0.032066;  
		/// <summary>
        /// Chlorine (0.0354527 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CL", name: "Chlorine", mass: 0.0354527)]
		public const double CL = 0.0354527;  
		/// <summary>
        /// Potassium (0.0390983 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "K", name: "Potassium", mass: 0.0390983)]
		public const double K = 0.0390983;  
		/// <summary>
        /// Argon (0.039948 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AR", name: "Argon", mass: 0.039948)]
		public const double AR = 0.039948;  
		/// <summary>
        /// Calcium (0.040078 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CA", name: "Calcium", mass: 0.040078)]
		public const double CA = 0.040078;  
		/// <summary>
        /// Scandium (0.04495591 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SC", name: "Scandium", mass: 0.04495591)]
		public const double SC = 0.04495591;  
		/// <summary>
        /// Titanium (0.04788 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TI", name: "Titanium", mass: 0.04788)]
		public const double TI = 0.04788;  
		/// <summary>
        /// Vanadium (0.0509415 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "V", name: "Vanadium", mass: 0.0509415)]
		public const double V = 0.0509415;  
		/// <summary>
        /// Chromium (0.0519961 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CR", name: "Chromium", mass: 0.0519961)]
		public const double CR = 0.0519961;  
		/// <summary>
        /// Manganese (0.05493805 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "MN", name: "Manganese", mass: 0.05493805)]
		public const double MN = 0.05493805;  
		/// <summary>
        /// Iron (0.055847 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "FE", name: "Iron", mass: 0.055847)]
		public const double FE = 0.055847;  
		/// <summary>
        /// Nickel (0.0586934 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "NI", name: "Nickel", mass: 0.0586934)]
		public const double NI = 0.0586934;  
		/// <summary>
        /// Cobalt (0.0589332 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CO", name: "Cobalt", mass: 0.0589332)]
		public const double CO = 0.0589332;  
		/// <summary>
        /// Copper (0.063546 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CU", name: "Copper", mass: 0.063546)]
		public const double CU = 0.063546;  
		/// <summary>
        /// Zinc (0.06539 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "ZN", name: "Zinc", mass: 0.06539)]
		public const double ZN = 0.06539;  
		/// <summary>
        /// Gallium (0.069723 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "GA", name: "Gallium", mass: 0.069723)]
		public const double GA = 0.069723;  
		/// <summary>
        /// Germanium (0.07261 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "GE", name: "Germanium", mass: 0.07261)]
		public const double GE = 0.07261;  
		/// <summary>
        /// Arsenic (0.07492159 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AS", name: "Arsenic", mass: 0.07492159)]
		public const double AS = 0.07492159;  
		/// <summary>
        /// Selenium (0.07896 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SE", name: "Selenium", mass: 0.07896)]
		public const double SE = 0.07896;  
		/// <summary>
        /// Bromine (0.079904 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "BR", name: "Bromine", mass: 0.079904)]
		public const double BR = 0.079904;  
		/// <summary>
        /// Krypton (0.0838 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "KR", name: "Krypton", mass: 0.0838)]
		public const double KR = 0.0838;  
		/// <summary>
        /// Rubidium (0.0854678 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RB", name: "Rubidium", mass: 0.0854678)]
		public const double RB = 0.0854678;  
		/// <summary>
        /// Strontium (0.08762 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SR", name: "Strontium", mass: 0.08762)]
		public const double SR = 0.08762;  
		/// <summary>
        /// Yttrium (0.08890585 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "Y", name: "Yttrium", mass: 0.08890585)]
		public const double Y = 0.08890585;  
		/// <summary>
        /// Zirconium (0.091224 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "ZR", name: "Zirconium", mass: 0.091224)]
		public const double ZR = 0.091224;  
		/// <summary>
        /// Niobium (0.09290638 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "NB", name: "Niobium", mass: 0.09290638)]
		public const double NB = 0.09290638;  
		/// <summary>
        /// Molybdenum (0.09594 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "MO", name: "Molybdenum", mass: 0.09594)]
		public const double MO = 0.09594;  
		/// <summary>
        /// Technetium (0.098 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TC", name: "Technetium", mass: 0.098)]
		public const double TC = 0.098;  
		/// <summary>
        /// Ruthenium (0.10107 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RU", name: "Ruthenium", mass: 0.10107)]
		public const double RU = 0.10107;  
		/// <summary>
        /// Rhodium (0.1029055 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RH", name: "Rhodium", mass: 0.1029055)]
		public const double RH = 0.1029055;  
		/// <summary>
        /// Palladium (0.10642 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PD", name: "Palladium", mass: 0.10642)]
		public const double PD = 0.10642;  
		/// <summary>
        /// Silver (0.1078682 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AG", name: "Silver", mass: 0.1078682)]
		public const double AG = 0.1078682;  
		/// <summary>
        /// Cadmium (0.112411 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CD", name: "Cadmium", mass: 0.112411)]
		public const double CD = 0.112411;  
		/// <summary>
        /// Indium (0.11482 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "IN", name: "Indium", mass: 0.11482)]
		public const double IN = 0.11482;  
		/// <summary>
        /// Tin (0.11871 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SN", name: "Tin", mass: 0.11871)]
		public const double SN = 0.11871;  
		/// <summary>
        /// Antimony (0.121757 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SB", name: "Antimony", mass: 0.121757)]
		public const double SB = 0.121757;  
		/// <summary>
        /// Iodine (0.12690447 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "I", name: "Iodine", mass: 0.12690447)]
		public const double I = 0.12690447;  
		/// <summary>
        /// Tellurium (0.1276 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TE", name: "Tellurium", mass: 0.1276)]
		public const double TE = 0.1276;  
		/// <summary>
        /// Xenon (0.13129 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "XE", name: "Xenon", mass: 0.13129)]
		public const double XE = 0.13129;  
		/// <summary>
        /// Cesium (0.1329054 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CS", name: "Cesium", mass: 0.1329054)]
		public const double CS = 0.1329054;  
		/// <summary>
        /// Barium (0.137327 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "BA", name: "Barium", mass: 0.137327)]
		public const double BA = 0.137327;  
		/// <summary>
        /// Lanthanum (0.1389055 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "LA", name: "Lanthanum", mass: 0.1389055)]
		public const double LA = 0.1389055;  
		/// <summary>
        /// Cerium (0.140115 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CE", name: "Cerium", mass: 0.140115)]
		public const double CE = 0.140115;  
		/// <summary>
        /// Praseodymium (0.1409077 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PR", name: "Praseodymium", mass: 0.1409077)]
		public const double PR = 0.1409077;  
		/// <summary>
        /// Neodymium (0.14424 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "ND", name: "Neodymium", mass: 0.14424)]
		public const double ND = 0.14424;  
		/// <summary>
        /// Promethium (0.145 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PM", name: "Promethium", mass: 0.145)]
		public const double PM = 0.145;  
		/// <summary>
        /// Samarium (0.15036 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "SM", name: "Samarium", mass: 0.15036)]
		public const double SM = 0.15036;  
		/// <summary>
        /// Europium (0.151965 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "EU", name: "Europium", mass: 0.151965)]
		public const double EU = 0.151965;  
		/// <summary>
        /// Gadolinium (0.15725 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "GD", name: "Gadolinium", mass: 0.15725)]
		public const double GD = 0.15725;  
		/// <summary>
        /// Terbium (0.1589253 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TB", name: "Terbium", mass: 0.1589253)]
		public const double TB = 0.1589253;  
		/// <summary>
        /// Dysprosium (0.1625 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "DY", name: "Dysprosium", mass: 0.1625)]
		public const double DY = 0.1625;  
		/// <summary>
        /// Holmium (0.1649303 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "HO", name: "Holmium", mass: 0.1649303)]
		public const double HO = 0.1649303;  
		/// <summary>
        /// Erbium (0.16726 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "ER", name: "Erbium", mass: 0.16726)]
		public const double ER = 0.16726;  
		/// <summary>
        /// Thulium (0.1689342 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TM", name: "Thulium", mass: 0.1689342)]
		public const double TM = 0.1689342;  
		/// <summary>
        /// Ytterbium (0.17304 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "YB", name: "Ytterbium", mass: 0.17304)]
		public const double YB = 0.17304;  
		/// <summary>
        /// Lutetium (0.174967 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "LU", name: "Lutetium", mass: 0.174967)]
		public const double LU = 0.174967;  
		/// <summary>
        /// Hafnium (0.17849 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "HF", name: "Hafnium", mass: 0.17849)]
		public const double HF = 0.17849;  
		/// <summary>
        /// Tantalum (0.1809479 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TA", name: "Tantalum", mass: 0.1809479)]
		public const double TA = 0.1809479;  
		/// <summary>
        /// Tungsten (0.18385 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "W", name: "Tungsten", mass: 0.18385)]
		public const double W = 0.18385;  
		/// <summary>
        /// Rhenium (0.186207 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RE", name: "Rhenium", mass: 0.186207)]
		public const double RE = 0.186207;  
		/// <summary>
        /// Osmium (0.1902 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "OS", name: "Osmium", mass: 0.1902)]
		public const double OS = 0.1902;  
		/// <summary>
        /// Iridium (0.19222 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "IR", name: "Iridium", mass: 0.19222)]
		public const double IR = 0.19222;  
		/// <summary>
        /// Platinum (0.19508 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PT", name: "Platinum", mass: 0.19508)]
		public const double PT = 0.19508;  
		/// <summary>
        /// Gold (0.1969665 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AU", name: "Gold", mass: 0.1969665)]
		public const double AU = 0.1969665;  
		/// <summary>
        /// Mercury (0.20059 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "HG", name: "Mercury", mass: 0.20059)]
		public const double HG = 0.20059;  
		/// <summary>
        /// Thallium (0.2043833 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TL", name: "Thallium", mass: 0.2043833)]
		public const double TL = 0.2043833;  
		/// <summary>
        /// Lead (0.2072 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PB", name: "Lead", mass: 0.2072)]
		public const double PB = 0.2072;  
		/// <summary>
        /// Bismuth (0.2089804 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "BI", name: "Bismuth", mass: 0.2089804)]
		public const double BI = 0.2089804;  
		/// <summary>
        /// Polonium (0.209 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PO", name: "Polonium", mass: 0.209)]
		public const double PO = 0.209;  
		/// <summary>
        /// Astatine (0.21 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AT", name: "Astatine", mass: 0.21)]
		public const double AT = 0.21;  
		/// <summary>
        /// Radon (0.222 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RN", name: "Radon", mass: 0.222)]
		public const double RN = 0.222;  
		/// <summary>
        /// Francium (0.223 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "FR", name: "Francium", mass: 0.223)]
		public const double FR = 0.223;  
		/// <summary>
        /// Radium (0.2260254 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "RA", name: "Radium", mass: 0.2260254)]
		public const double RA = 0.2260254;  
		/// <summary>
        /// Actinium (0.227 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AC", name: "Actinium", mass: 0.227)]
		public const double AC = 0.227;  
		/// <summary>
        /// Protactinium (0.23103588 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PA", name: "Protactinium", mass: 0.23103588)]
		public const double PA = 0.23103588;  
		/// <summary>
        /// Thorium (0.2320381 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "TH", name: "Thorium", mass: 0.2320381)]
		public const double TH = 0.2320381;  
		/// <summary>
        /// Neptunium (0.2370482 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "NP", name: "Neptunium", mass: 0.2370482)]
		public const double NP = 0.2370482;  
		/// <summary>
        /// Uranium (0.2380289 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "U", name: "Uranium", mass: 0.2380289)]
		public const double U = 0.2380289;  
		/// <summary>
        /// Americium (0.243 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "AM", name: "Americium", mass: 0.243)]
		public const double AM = 0.243;  
		/// <summary>
        /// Plutonium (0.244 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "PU", name: "Plutonium", mass: 0.244)]
		public const double PU = 0.244;  
		/// <summary>
        /// Berkelium (0.247 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "BK", name: "Berkelium", mass: 0.247)]
		public const double BK = 0.247;  
		/// <summary>
        /// Californium (0.247 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CF", name: "Californium", mass: 0.247)]
		public const double CF = 0.247;  
		/// <summary>
        /// Curium (0.247 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "CM", name: "Curium", mass: 0.247)]
		public const double CM = 0.247;  
		/// <summary>
        /// Einsteinium (0.251 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "ES", name: "Einsteinium", mass: 0.251)]
		public const double ES = 0.251;  
		/// <summary>
        /// Fermium (0.257 kg/mol)
        /// </summary>
		[ChemicalElementInfo(id: "FM", name: "Fermium", mass: 0.257)]
		public const double FM = 0.257;  
	}
	#endregion Constants

	#region Attributes

	[AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
    public class ChemicalElementInfoAttribute : System.Attribute
	{
		public ChemicalElementInfoAttribute(string id, string name, double mass)
		{
			ID = id;
			Name = name;
			Mass = mass;
		}

		public string ID { get; set; }

		public string Name { get; set; }

		public double Mass { get; set; }
	}

	/// <summary>
    /// Defines units value and Regex pattern
    /// </summary>
    [AttributeUsage(AttributeTargets.Field, Inherited = false, AllowMultiple = false)]
    public class UnitsAttribute : System.Attribute
    {
		/// <summary>
        /// Initializes a new instance of the Nature.UnitsAttribute attribute
        /// </summary>
        /// <param name="value">Value</param>
        /// <param name="pattern">Regex pattern</param>
        public UnitsAttribute(double value, string pattern)
        {
            this.Value = value;
            this.Pattern = pattern;
        }
			
		/// <summary>
        /// Value
        /// </summary>
        public double Value { get; private set; }

		/// <summary>
        /// Regex pattern
        /// </summary>
        public string Pattern { get; private set; }
    }
	#endregion Attributes

	#region Enumerations
	
    
    /// <summary>
    /// Energy
    /// </summary>
    [DataContract]
    public enum EnergyUnits
    {  
        /// <summary>
        /// Calorie (4.1868 Joule)
        /// </summary>
        [Units(4.1868, @"(?:cal(?:orie)?)")]
        [EnumMember]
        Calorie, 
    	 
        /// <summary>
        /// CentiCalorie (0.041868 Joule)
        /// </summary>
        [Units(0.041868, @"(?:centi(?:cal(?:orie)?))")]
        [EnumMember]
        CentiCalorie, 
    	 
        /// <summary>
        /// CentiJoule (0.01 Joule)
        /// </summary>
        [Units(0.01, @"(?:centi(?:joule?))")]
        [EnumMember]
        CentiJoule, 
    	 
        /// <summary>
        /// DeciCalorie (0.41868 Joule)
        /// </summary>
        [Units(0.41868, @"(?:deci(?:cal(?:orie)?))")]
        [EnumMember]
        DeciCalorie, 
    	 
        /// <summary>
        /// DeciJoule (0.1 Joule)
        /// </summary>
        [Units(0.1, @"(?:deci(?:joule?))")]
        [EnumMember]
        DeciJoule, 
    	 
        /// <summary>
        /// Erg (1E-07 Joule)
        /// </summary>
        [Units(1E-07, @"(?:erg)")]
        [EnumMember]
        Erg, 
    	 
        /// <summary>
        /// Evolt (1.6021773E-19 Joule)
        /// </summary>
        [Units(1.6021773E-19, @"(?:evolt)")]
        [EnumMember]
        Evolt, 
    	 
        /// <summary>
        /// GigaCalorie (4186800000 Joule)
        /// </summary>
        [Units(4186800000, @"(?:giga(?:cal(?:orie)?))")]
        [EnumMember]
        GigaCalorie, 
    	 
        /// <summary>
        /// GigaJoule (1000000000 Joule)
        /// </summary>
        [Units(1000000000, @"(?:giga(?:joule?))")]
        [EnumMember]
        GigaJoule, 
    	 
        /// <summary>
        /// Joule (1 Joule)
        /// </summary>
        [Units(1, @"(?:joule?)")]
        [EnumMember]
        Joule, 
    	 
        /// <summary>
        /// KiloCalorie (4186.8 Joule)
        /// </summary>
        [Units(4186.8, @"(?:kilo(?:cal(?:orie)?)|k(?:cal(?:orie)?))")]
        [EnumMember]
        KiloCalorie, 
    	 
        /// <summary>
        /// KiloJoule (1000 Joule)
        /// </summary>
        [Units(1000, @"(?:kilo(?:joule?)|k(?:joule?))")]
        [EnumMember]
        KiloJoule, 
    	 
        /// <summary>
        /// MegaCalorie (4186800 Joule)
        /// </summary>
        [Units(4186800, @"(?:mega(?:cal(?:orie)?))")]
        [EnumMember]
        MegaCalorie, 
    	 
        /// <summary>
        /// MegaJoule (1000000 Joule)
        /// </summary>
        [Units(1000000, @"(?:mega(?:joule?))")]
        [EnumMember]
        MegaJoule, 
    	 
        /// <summary>
        /// MicroCalorie (4.1868E-06 Joule)
        /// </summary>
        [Units(4.1868E-06, @"(?:micro(?:cal(?:orie)?))")]
        [EnumMember]
        MicroCalorie, 
    	 
        /// <summary>
        /// MicroJoule (1E-06 Joule)
        /// </summary>
        [Units(1E-06, @"(?:micro(?:joule?))")]
        [EnumMember]
        MicroJoule, 
    	 
        /// <summary>
        /// MilliCalorie (0.0041868 Joule)
        /// </summary>
        [Units(0.0041868, @"(?:milli(?:cal(?:orie)?))")]
        [EnumMember]
        MilliCalorie, 
    	 
        /// <summary>
        /// MilliJoule (0.001 Joule)
        /// </summary>
        [Units(0.001, @"(?:milli(?:joule?))")]
        [EnumMember]
        MilliJoule, 
    	 
        /// <summary>
        /// NanoCalorie (4.1868E-09 Joule)
        /// </summary>
        [Units(4.1868E-09, @"(?:nano(?:cal(?:orie)?))")]
        [EnumMember]
        NanoCalorie, 
    	 
        /// <summary>
        /// NanoJoule (1E-09 Joule)
        /// </summary>
        [Units(1E-09, @"(?:nano(?:joule?))")]
        [EnumMember]
        NanoJoule 
    	 
    }

    
    /// <summary>
    /// Length
    /// </summary>
    [DataContract]
    public enum LengthUnits
    {  
        /// <summary>
        /// Angstrom (1E-10 Meter)
        /// </summary>
        [Units(1E-10, @"(?:angstrom)")]
        [EnumMember]
        Angstrom, 
    	 
        /// <summary>
        /// CentiMeter (0.01 Meter)
        /// </summary>
        [Units(0.01, @"(?:centi(?:meter|m))")]
        [EnumMember]
        CentiMeter, 
    	 
        /// <summary>
        /// DeciMeter (0.1 Meter)
        /// </summary>
        [Units(0.1, @"(?:deci(?:meter|m))")]
        [EnumMember]
        DeciMeter, 
    	 
        /// <summary>
        /// GigaMeter (1000000000 Meter)
        /// </summary>
        [Units(1000000000, @"(?:giga(?:meter|m))")]
        [EnumMember]
        GigaMeter, 
    	 
        /// <summary>
        /// KiloMeter (1000 Meter)
        /// </summary>
        [Units(1000, @"(?:kilo(?:meter|m)|k(?:meter|m))")]
        [EnumMember]
        KiloMeter, 
    	 
        /// <summary>
        /// MegaMeter (1000000 Meter)
        /// </summary>
        [Units(1000000, @"(?:mega(?:meter|m))")]
        [EnumMember]
        MegaMeter, 
    	 
        /// <summary>
        /// Meter (1 Meter)
        /// </summary>
        [Units(1, @"(?:meter|m)")]
        [EnumMember]
        Meter, 
    	 
        /// <summary>
        /// MicroMeter (1E-06 Meter)
        /// </summary>
        [Units(1E-06, @"(?:micro(?:meter|m))")]
        [EnumMember]
        MicroMeter, 
    	 
        /// <summary>
        /// MilliMeter (0.001 Meter)
        /// </summary>
        [Units(0.001, @"(?:milli(?:meter|m))")]
        [EnumMember]
        MilliMeter, 
    	 
        /// <summary>
        /// NanoMeter (1E-09 Meter)
        /// </summary>
        [Units(1E-09, @"(?:nano(?:meter|m))")]
        [EnumMember]
        NanoMeter 
    	 
    }

    
    /// <summary>
    /// Mass
    /// </summary>
    [DataContract]
    public enum MassUnits
    {  
        /// <summary>
        /// CentiGram (1E-05 KiloGram)
        /// </summary>
        [Units(1E-05, @"(?:centi(?:gram))")]
        [EnumMember]
        CentiGram, 
    	 
        /// <summary>
        /// CentiTonne (10 KiloGram)
        /// </summary>
        [Units(10, @"(?:centi(?:ton(?:ne?)?))")]
        [EnumMember]
        CentiTonne, 
    	 
        /// <summary>
        /// DeciGram (0.0001 KiloGram)
        /// </summary>
        [Units(0.0001, @"(?:deci(?:gram))")]
        [EnumMember]
        DeciGram, 
    	 
        /// <summary>
        /// DeciTonne (100 KiloGram)
        /// </summary>
        [Units(100, @"(?:deci(?:ton(?:ne?)?))")]
        [EnumMember]
        DeciTonne, 
    	 
        /// <summary>
        /// GigaGram (1000000 KiloGram)
        /// </summary>
        [Units(1000000, @"(?:giga(?:gram))")]
        [EnumMember]
        GigaGram, 
    	 
        /// <summary>
        /// GigaTonne (1000000000000 KiloGram)
        /// </summary>
        [Units(1000000000000, @"(?:giga(?:ton(?:ne?)?))")]
        [EnumMember]
        GigaTonne, 
    	 
        /// <summary>
        /// Gram (0.001 KiloGram)
        /// </summary>
        [Units(0.001, @"(?:gram)")]
        [EnumMember]
        Gram, 
    	 
        /// <summary>
        /// KiloGram (1 KiloGram)
        /// </summary>
        [Units(1, @"(?:kilo(?:gram)|k(?:gram))")]
        [EnumMember]
        KiloGram, 
    	 
        /// <summary>
        /// KiloTonne (1000000 KiloGram)
        /// </summary>
        [Units(1000000, @"(?:kilo(?:ton(?:ne?)?)|k(?:ton(?:ne?)?))")]
        [EnumMember]
        KiloTonne, 
    	 
        /// <summary>
        /// MegaGram (1000 KiloGram)
        /// </summary>
        [Units(1000, @"(?:mega(?:gram))")]
        [EnumMember]
        MegaGram, 
    	 
        /// <summary>
        /// MegaTonne (1000000000 KiloGram)
        /// </summary>
        [Units(1000000000, @"(?:mega(?:ton(?:ne?)?))")]
        [EnumMember]
        MegaTonne, 
    	 
        /// <summary>
        /// MicroGram (1E-09 KiloGram)
        /// </summary>
        [Units(1E-09, @"(?:micro(?:gram))")]
        [EnumMember]
        MicroGram, 
    	 
        /// <summary>
        /// MicroTonne (0.001 KiloGram)
        /// </summary>
        [Units(0.001, @"(?:micro(?:ton(?:ne?)?))")]
        [EnumMember]
        MicroTonne, 
    	 
        /// <summary>
        /// MilliGram (1E-06 KiloGram)
        /// </summary>
        [Units(1E-06, @"(?:milli(?:gram))")]
        [EnumMember]
        MilliGram, 
    	 
        /// <summary>
        /// MilliTonne (1 KiloGram)
        /// </summary>
        [Units(1, @"(?:milli(?:ton(?:ne?)?))")]
        [EnumMember]
        MilliTonne, 
    	 
        /// <summary>
        /// NanoGram (1E-12 KiloGram)
        /// </summary>
        [Units(1E-12, @"(?:nano(?:gram))")]
        [EnumMember]
        NanoGram, 
    	 
        /// <summary>
        /// NanoTonne (1E-06 KiloGram)
        /// </summary>
        [Units(1E-06, @"(?:nano(?:ton(?:ne?)?))")]
        [EnumMember]
        NanoTonne, 
    	 
        /// <summary>
        /// Tonne (1000 KiloGram)
        /// </summary>
        [Units(1000, @"(?:ton(?:ne?)?)")]
        [EnumMember]
        Tonne 
    	 
    }

    
    /// <summary>
    /// MolarAmount
    /// </summary>
    [DataContract]
    public enum MolarAmountUnits
    {  
        /// <summary>
        /// CentiMole (0.01 Mole)
        /// </summary>
        [Units(0.01, @"(?:centi(?:mole?))")]
        [EnumMember]
        CentiMole, 
    	 
        /// <summary>
        /// DeciMole (0.1 Mole)
        /// </summary>
        [Units(0.1, @"(?:deci(?:mole?))")]
        [EnumMember]
        DeciMole, 
    	 
        /// <summary>
        /// GigaMole (1000000000 Mole)
        /// </summary>
        [Units(1000000000, @"(?:giga(?:mole?))")]
        [EnumMember]
        GigaMole, 
    	 
        /// <summary>
        /// KiloMole (1000 Mole)
        /// </summary>
        [Units(1000, @"(?:kilo(?:mole?)|k(?:mole?))")]
        [EnumMember]
        KiloMole, 
    	 
        /// <summary>
        /// MegaMole (1000000 Mole)
        /// </summary>
        [Units(1000000, @"(?:mega(?:mole?))")]
        [EnumMember]
        MegaMole, 
    	 
        /// <summary>
        /// MicroMole (1E-06 Mole)
        /// </summary>
        [Units(1E-06, @"(?:micro(?:mole?))")]
        [EnumMember]
        MicroMole, 
    	 
        /// <summary>
        /// MilliMole (0.001 Mole)
        /// </summary>
        [Units(0.001, @"(?:milli(?:mole?))")]
        [EnumMember]
        MilliMole, 
    	 
        /// <summary>
        /// Mole (1 Mole)
        /// </summary>
        [Units(1, @"(?:mole?)")]
        [EnumMember]
        Mole, 
    	 
        /// <summary>
        /// Molecule (1.6605654723603E-24 Mole)
        /// </summary>
        [Units(1.6605654723603E-24, @"(?:molec(?:ule)?)")]
        [EnumMember]
        Molecule, 
    	 
        /// <summary>
        /// NanoMole (1E-09 Mole)
        /// </summary>
        [Units(1E-09, @"(?:nano(?:mole?))")]
        [EnumMember]
        NanoMole 
    	 
    }

    
    /// <summary>
    /// Pressure
    /// </summary>
    [DataContract]
    public enum PressureUnits
    {  
        /// <summary>
        /// Atmosphere (101325 Pascal)
        /// </summary>
        [Units(101325, @"(?:atm(?:osphere)?)")]
        [EnumMember]
        Atmosphere, 
    	 
        /// <summary>
        /// Bar (100000 Pascal)
        /// </summary>
        [Units(100000, @"(?:bar)")]
        [EnumMember]
        Bar, 
    	 
        /// <summary>
        /// CentiBar (1000 Pascal)
        /// </summary>
        [Units(1000, @"(?:centi(?:bar))")]
        [EnumMember]
        CentiBar, 
    	 
        /// <summary>
        /// CentiPascal (0.01 Pascal)
        /// </summary>
        [Units(0.01, @"(?:centi(?:pasc(?:al)?))")]
        [EnumMember]
        CentiPascal, 
    	 
        /// <summary>
        /// CentiPsi (68.95 Pascal)
        /// </summary>
        [Units(68.95, @"(?:centi(?:psi))")]
        [EnumMember]
        CentiPsi, 
    	 
        /// <summary>
        /// CentiTorr (1.33322 Pascal)
        /// </summary>
        [Units(1.33322, @"(?:centi(?:torr))")]
        [EnumMember]
        CentiTorr, 
    	 
        /// <summary>
        /// DeciBar (10000 Pascal)
        /// </summary>
        [Units(10000, @"(?:deci(?:bar))")]
        [EnumMember]
        DeciBar, 
    	 
        /// <summary>
        /// DeciPascal (0.1 Pascal)
        /// </summary>
        [Units(0.1, @"(?:deci(?:pasc(?:al)?))")]
        [EnumMember]
        DeciPascal, 
    	 
        /// <summary>
        /// DeciPsi (689.5 Pascal)
        /// </summary>
        [Units(689.5, @"(?:deci(?:psi))")]
        [EnumMember]
        DeciPsi, 
    	 
        /// <summary>
        /// DeciTorr (13.3322 Pascal)
        /// </summary>
        [Units(13.3322, @"(?:deci(?:torr))")]
        [EnumMember]
        DeciTorr, 
    	 
        /// <summary>
        /// GigaBar (100000000000000 Pascal)
        /// </summary>
        [Units(100000000000000, @"(?:giga(?:bar))")]
        [EnumMember]
        GigaBar, 
    	 
        /// <summary>
        /// GigaPascal (1000000000 Pascal)
        /// </summary>
        [Units(1000000000, @"(?:giga(?:pasc(?:al)?))")]
        [EnumMember]
        GigaPascal, 
    	 
        /// <summary>
        /// GigaPsi (6895000000000 Pascal)
        /// </summary>
        [Units(6895000000000, @"(?:giga(?:psi))")]
        [EnumMember]
        GigaPsi, 
    	 
        /// <summary>
        /// GigaTorr (133322000000 Pascal)
        /// </summary>
        [Units(133322000000, @"(?:giga(?:torr))")]
        [EnumMember]
        GigaTorr, 
    	 
        /// <summary>
        /// KiloBar (100000000 Pascal)
        /// </summary>
        [Units(100000000, @"(?:kilo(?:bar)|k(?:bar))")]
        [EnumMember]
        KiloBar, 
    	 
        /// <summary>
        /// KiloPascal (1000 Pascal)
        /// </summary>
        [Units(1000, @"(?:kilo(?:pasc(?:al)?)|k(?:pasc(?:al)?))")]
        [EnumMember]
        KiloPascal, 
    	 
        /// <summary>
        /// KiloPsi (6895000 Pascal)
        /// </summary>
        [Units(6895000, @"(?:kilo(?:psi)|k(?:psi))")]
        [EnumMember]
        KiloPsi, 
    	 
        /// <summary>
        /// KiloTorr (133322 Pascal)
        /// </summary>
        [Units(133322, @"(?:kilo(?:torr)|k(?:torr))")]
        [EnumMember]
        KiloTorr, 
    	 
        /// <summary>
        /// MegaBar (100000000000 Pascal)
        /// </summary>
        [Units(100000000000, @"(?:mega(?:bar))")]
        [EnumMember]
        MegaBar, 
    	 
        /// <summary>
        /// MegaPascal (1000000 Pascal)
        /// </summary>
        [Units(1000000, @"(?:mega(?:pasc(?:al)?))")]
        [EnumMember]
        MegaPascal, 
    	 
        /// <summary>
        /// MegaPsi (6895000000 Pascal)
        /// </summary>
        [Units(6895000000, @"(?:mega(?:psi))")]
        [EnumMember]
        MegaPsi, 
    	 
        /// <summary>
        /// MegaTorr (133322000 Pascal)
        /// </summary>
        [Units(133322000, @"(?:mega(?:torr))")]
        [EnumMember]
        MegaTorr, 
    	 
        /// <summary>
        /// MicroBar (0.1 Pascal)
        /// </summary>
        [Units(0.1, @"(?:micro(?:bar))")]
        [EnumMember]
        MicroBar, 
    	 
        /// <summary>
        /// MicroPascal (1E-06 Pascal)
        /// </summary>
        [Units(1E-06, @"(?:micro(?:pasc(?:al)?))")]
        [EnumMember]
        MicroPascal, 
    	 
        /// <summary>
        /// MicroPsi (0.006895 Pascal)
        /// </summary>
        [Units(0.006895, @"(?:micro(?:psi))")]
        [EnumMember]
        MicroPsi, 
    	 
        /// <summary>
        /// MicroTorr (0.000133322 Pascal)
        /// </summary>
        [Units(0.000133322, @"(?:micro(?:torr))")]
        [EnumMember]
        MicroTorr, 
    	 
        /// <summary>
        /// MilliBar (100 Pascal)
        /// </summary>
        [Units(100, @"(?:milli(?:bar))")]
        [EnumMember]
        MilliBar, 
    	 
        /// <summary>
        /// MilliPascal (0.001 Pascal)
        /// </summary>
        [Units(0.001, @"(?:milli(?:pasc(?:al)?))")]
        [EnumMember]
        MilliPascal, 
    	 
        /// <summary>
        /// MilliPsi (6.895 Pascal)
        /// </summary>
        [Units(6.895, @"(?:milli(?:psi))")]
        [EnumMember]
        MilliPsi, 
    	 
        /// <summary>
        /// MilliTorr (0.133322 Pascal)
        /// </summary>
        [Units(0.133322, @"(?:milli(?:torr))")]
        [EnumMember]
        MilliTorr, 
    	 
        /// <summary>
        /// NanoBar (0.0001 Pascal)
        /// </summary>
        [Units(0.0001, @"(?:nano(?:bar))")]
        [EnumMember]
        NanoBar, 
    	 
        /// <summary>
        /// NanoPascal (1E-09 Pascal)
        /// </summary>
        [Units(1E-09, @"(?:nano(?:pasc(?:al)?))")]
        [EnumMember]
        NanoPascal, 
    	 
        /// <summary>
        /// NanoPsi (6.895E-06 Pascal)
        /// </summary>
        [Units(6.895E-06, @"(?:nano(?:psi))")]
        [EnumMember]
        NanoPsi, 
    	 
        /// <summary>
        /// NanoTorr (1.33322E-07 Pascal)
        /// </summary>
        [Units(1.33322E-07, @"(?:nano(?:torr))")]
        [EnumMember]
        NanoTorr, 
    	 
        /// <summary>
        /// Pascal (1 Pascal)
        /// </summary>
        [Units(1, @"(?:pasc(?:al)?)")]
        [EnumMember]
        Pascal, 
    	 
        /// <summary>
        /// Psi (6895 Pascal)
        /// </summary>
        [Units(6895, @"(?:psi)")]
        [EnumMember]
        Psi, 
    	 
        /// <summary>
        /// Torr (133.322 Pascal)
        /// </summary>
        [Units(133.322, @"(?:torr)")]
        [EnumMember]
        Torr 
    	 
    }

    
    /// <summary>
    /// Temperature
    /// </summary>
    [DataContract]
    public enum TemperatureUnits
    {  
        /// <summary>
        /// Celsius (1 Kelvin)
        /// </summary>
        [Units(1, @"(?:cel(?:sius)?)")]
        [EnumMember]
        Celsius, 
    	 
        /// <summary>
        /// Fahrenheit (1.8 Kelvin)
        /// </summary>
        [Units(1.8, @"(?:fahrenheit)")]
        [EnumMember]
        Fahrenheit, 
    	 
        /// <summary>
        /// Kelvin (1 Kelvin)
        /// </summary>
        [Units(1, @"(?:k(?:elv(?:in)?)?)")]
        [EnumMember]
        Kelvin, 
    	 
        /// <summary>
        /// Rankine (1.8 Kelvin)
        /// </summary>
        [Units(1.8, @"(?:rankine)")]
        [EnumMember]
        Rankine 
    	 
    }

    
    /// <summary>
    /// Time
    /// </summary>
    [DataContract]
    public enum TimeUnits
    {  
        /// <summary>
        /// CentiSecond (0.01 Second)
        /// </summary>
        [Units(0.01, @"(?:centi(?:sec(?:ond)?))")]
        [EnumMember]
        CentiSecond, 
    	 
        /// <summary>
        /// DeciSecond (0.1 Second)
        /// </summary>
        [Units(0.1, @"(?:deci(?:sec(?:ond)?))")]
        [EnumMember]
        DeciSecond, 
    	 
        /// <summary>
        /// GigaSecond (1000000000 Second)
        /// </summary>
        [Units(1000000000, @"(?:giga(?:sec(?:ond)?))")]
        [EnumMember]
        GigaSecond, 
    	 
        /// <summary>
        /// Hour (3600 Second)
        /// </summary>
        [Units(3600, @"(?:hour)")]
        [EnumMember]
        Hour, 
    	 
        /// <summary>
        /// KiloSecond (1000 Second)
        /// </summary>
        [Units(1000, @"(?:kilo(?:sec(?:ond)?)|k(?:sec(?:ond)?))")]
        [EnumMember]
        KiloSecond, 
    	 
        /// <summary>
        /// MegaSecond (1000000 Second)
        /// </summary>
        [Units(1000000, @"(?:mega(?:sec(?:ond)?))")]
        [EnumMember]
        MegaSecond, 
    	 
        /// <summary>
        /// MicroSecond (1E-06 Second)
        /// </summary>
        [Units(1E-06, @"(?:micro(?:sec(?:ond)?))")]
        [EnumMember]
        MicroSecond, 
    	 
        /// <summary>
        /// MilliSecond (0.001 Second)
        /// </summary>
        [Units(0.001, @"(?:milli(?:sec(?:ond)?))")]
        [EnumMember]
        MilliSecond, 
    	 
        /// <summary>
        /// Minute (60 Second)
        /// </summary>
        [Units(60, @"(?:min(?:ute?)?)")]
        [EnumMember]
        Minute, 
    	 
        /// <summary>
        /// NanoSecond (1E-09 Second)
        /// </summary>
        [Units(1E-09, @"(?:nano(?:sec(?:ond)?))")]
        [EnumMember]
        NanoSecond, 
    	 
        /// <summary>
        /// Second (1 Second)
        /// </summary>
        [Units(1, @"(?:sec(?:ond)?)")]
        [EnumMember]
        Second 
    	 
    }

    
	#endregion Enumerations

	#region  Enumeration Extensions

    public static partial class ITolerance
    {  
        #region Energy
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this EnergyUnits units)
        {
            switch(units)
            { 
                case(EnergyUnits.Calorie): return 4.1868;   
                case(EnergyUnits.CentiCalorie): return 0.041868;   
                case(EnergyUnits.CentiJoule): return 0.01;   
                case(EnergyUnits.DeciCalorie): return 0.41868;   
                case(EnergyUnits.DeciJoule): return 0.1;   
                case(EnergyUnits.Erg): return 1E-07;   
                case(EnergyUnits.Evolt): return 1.6021773E-19;   
                case(EnergyUnits.GigaCalorie): return 4186800000;   
                case(EnergyUnits.GigaJoule): return 1000000000;   
                case(EnergyUnits.Joule): return 1;   
                case(EnergyUnits.KiloCalorie): return 4186.8;   
                case(EnergyUnits.KiloJoule): return 1000;   
                case(EnergyUnits.MegaCalorie): return 4186800;   
                case(EnergyUnits.MegaJoule): return 1000000;   
                case(EnergyUnits.MicroCalorie): return 4.1868E-06;   
                case(EnergyUnits.MicroJoule): return 1E-06;   
                case(EnergyUnits.MilliCalorie): return 0.0041868;   
                case(EnergyUnits.MilliJoule): return 0.001;   
                case(EnergyUnits.NanoCalorie): return 4.1868E-09;   
                case(EnergyUnits.NanoJoule): return 1E-09;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this EnergyUnits units)
        {
            switch(units)
            {  
                case(EnergyUnits.Calorie): return @"(?:cal(?:orie)?)";   
                case(EnergyUnits.CentiCalorie): return @"(?:centi(?:cal(?:orie)?))";   
                case(EnergyUnits.CentiJoule): return @"(?:centi(?:joule?))";   
                case(EnergyUnits.DeciCalorie): return @"(?:deci(?:cal(?:orie)?))";   
                case(EnergyUnits.DeciJoule): return @"(?:deci(?:joule?))";   
                case(EnergyUnits.Erg): return @"(?:erg)";   
                case(EnergyUnits.Evolt): return @"(?:evolt)";   
                case(EnergyUnits.GigaCalorie): return @"(?:giga(?:cal(?:orie)?))";   
                case(EnergyUnits.GigaJoule): return @"(?:giga(?:joule?))";   
                case(EnergyUnits.Joule): return @"(?:joule?)";   
                case(EnergyUnits.KiloCalorie): return @"(?:kilo(?:cal(?:orie)?)|k(?:cal(?:orie)?))";   
                case(EnergyUnits.KiloJoule): return @"(?:kilo(?:joule?)|k(?:joule?))";   
                case(EnergyUnits.MegaCalorie): return @"(?:mega(?:cal(?:orie)?))";   
                case(EnergyUnits.MegaJoule): return @"(?:mega(?:joule?))";   
                case(EnergyUnits.MicroCalorie): return @"(?:micro(?:cal(?:orie)?))";   
                case(EnergyUnits.MicroJoule): return @"(?:micro(?:joule?))";   
                case(EnergyUnits.MilliCalorie): return @"(?:milli(?:cal(?:orie)?))";   
                case(EnergyUnits.MilliJoule): return @"(?:milli(?:joule?))";   
                case(EnergyUnits.NanoCalorie): return @"(?:nano(?:cal(?:orie)?))";   
                case(EnergyUnits.NanoJoule): return @"(?:nano(?:joule?))";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region Length
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this LengthUnits units)
        {
            switch(units)
            { 
                case(LengthUnits.Angstrom): return 1E-10;   
                case(LengthUnits.CentiMeter): return 0.01;   
                case(LengthUnits.DeciMeter): return 0.1;   
                case(LengthUnits.GigaMeter): return 1000000000;   
                case(LengthUnits.KiloMeter): return 1000;   
                case(LengthUnits.MegaMeter): return 1000000;   
                case(LengthUnits.Meter): return 1;   
                case(LengthUnits.MicroMeter): return 1E-06;   
                case(LengthUnits.MilliMeter): return 0.001;   
                case(LengthUnits.NanoMeter): return 1E-09;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this LengthUnits units)
        {
            switch(units)
            {  
                case(LengthUnits.Angstrom): return @"(?:angstrom)";   
                case(LengthUnits.CentiMeter): return @"(?:centi(?:meter|m))";   
                case(LengthUnits.DeciMeter): return @"(?:deci(?:meter|m))";   
                case(LengthUnits.GigaMeter): return @"(?:giga(?:meter|m))";   
                case(LengthUnits.KiloMeter): return @"(?:kilo(?:meter|m)|k(?:meter|m))";   
                case(LengthUnits.MegaMeter): return @"(?:mega(?:meter|m))";   
                case(LengthUnits.Meter): return @"(?:meter|m)";   
                case(LengthUnits.MicroMeter): return @"(?:micro(?:meter|m))";   
                case(LengthUnits.MilliMeter): return @"(?:milli(?:meter|m))";   
                case(LengthUnits.NanoMeter): return @"(?:nano(?:meter|m))";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region Mass
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this MassUnits units)
        {
            switch(units)
            { 
                case(MassUnits.CentiGram): return 1E-05;   
                case(MassUnits.CentiTonne): return 10;   
                case(MassUnits.DeciGram): return 0.0001;   
                case(MassUnits.DeciTonne): return 100;   
                case(MassUnits.GigaGram): return 1000000;   
                case(MassUnits.GigaTonne): return 1000000000000;   
                case(MassUnits.Gram): return 0.001;   
                case(MassUnits.KiloGram): return 1;   
                case(MassUnits.KiloTonne): return 1000000;   
                case(MassUnits.MegaGram): return 1000;   
                case(MassUnits.MegaTonne): return 1000000000;   
                case(MassUnits.MicroGram): return 1E-09;   
                case(MassUnits.MicroTonne): return 0.001;   
                case(MassUnits.MilliGram): return 1E-06;   
                case(MassUnits.MilliTonne): return 1;   
                case(MassUnits.NanoGram): return 1E-12;   
                case(MassUnits.NanoTonne): return 1E-06;   
                case(MassUnits.Tonne): return 1000;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this MassUnits units)
        {
            switch(units)
            {  
                case(MassUnits.CentiGram): return @"(?:centi(?:gram))";   
                case(MassUnits.CentiTonne): return @"(?:centi(?:ton(?:ne?)?))";   
                case(MassUnits.DeciGram): return @"(?:deci(?:gram))";   
                case(MassUnits.DeciTonne): return @"(?:deci(?:ton(?:ne?)?))";   
                case(MassUnits.GigaGram): return @"(?:giga(?:gram))";   
                case(MassUnits.GigaTonne): return @"(?:giga(?:ton(?:ne?)?))";   
                case(MassUnits.Gram): return @"(?:gram)";   
                case(MassUnits.KiloGram): return @"(?:kilo(?:gram)|k(?:gram))";   
                case(MassUnits.KiloTonne): return @"(?:kilo(?:ton(?:ne?)?)|k(?:ton(?:ne?)?))";   
                case(MassUnits.MegaGram): return @"(?:mega(?:gram))";   
                case(MassUnits.MegaTonne): return @"(?:mega(?:ton(?:ne?)?))";   
                case(MassUnits.MicroGram): return @"(?:micro(?:gram))";   
                case(MassUnits.MicroTonne): return @"(?:micro(?:ton(?:ne?)?))";   
                case(MassUnits.MilliGram): return @"(?:milli(?:gram))";   
                case(MassUnits.MilliTonne): return @"(?:milli(?:ton(?:ne?)?))";   
                case(MassUnits.NanoGram): return @"(?:nano(?:gram))";   
                case(MassUnits.NanoTonne): return @"(?:nano(?:ton(?:ne?)?))";   
                case(MassUnits.Tonne): return @"(?:ton(?:ne?)?)";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region MolarAmount
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this MolarAmountUnits units)
        {
            switch(units)
            { 
                case(MolarAmountUnits.CentiMole): return 0.01;   
                case(MolarAmountUnits.DeciMole): return 0.1;   
                case(MolarAmountUnits.GigaMole): return 1000000000;   
                case(MolarAmountUnits.KiloMole): return 1000;   
                case(MolarAmountUnits.MegaMole): return 1000000;   
                case(MolarAmountUnits.MicroMole): return 1E-06;   
                case(MolarAmountUnits.MilliMole): return 0.001;   
                case(MolarAmountUnits.Mole): return 1;   
                case(MolarAmountUnits.Molecule): return 1.6605654723603E-24;   
                case(MolarAmountUnits.NanoMole): return 1E-09;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this MolarAmountUnits units)
        {
            switch(units)
            {  
                case(MolarAmountUnits.CentiMole): return @"(?:centi(?:mole?))";   
                case(MolarAmountUnits.DeciMole): return @"(?:deci(?:mole?))";   
                case(MolarAmountUnits.GigaMole): return @"(?:giga(?:mole?))";   
                case(MolarAmountUnits.KiloMole): return @"(?:kilo(?:mole?)|k(?:mole?))";   
                case(MolarAmountUnits.MegaMole): return @"(?:mega(?:mole?))";   
                case(MolarAmountUnits.MicroMole): return @"(?:micro(?:mole?))";   
                case(MolarAmountUnits.MilliMole): return @"(?:milli(?:mole?))";   
                case(MolarAmountUnits.Mole): return @"(?:mole?)";   
                case(MolarAmountUnits.Molecule): return @"(?:molec(?:ule)?)";   
                case(MolarAmountUnits.NanoMole): return @"(?:nano(?:mole?))";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region Pressure
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this PressureUnits units)
        {
            switch(units)
            { 
                case(PressureUnits.Atmosphere): return 101325;   
                case(PressureUnits.Bar): return 100000;   
                case(PressureUnits.CentiBar): return 1000;   
                case(PressureUnits.CentiPascal): return 0.01;   
                case(PressureUnits.CentiPsi): return 68.95;   
                case(PressureUnits.CentiTorr): return 1.33322;   
                case(PressureUnits.DeciBar): return 10000;   
                case(PressureUnits.DeciPascal): return 0.1;   
                case(PressureUnits.DeciPsi): return 689.5;   
                case(PressureUnits.DeciTorr): return 13.3322;   
                case(PressureUnits.GigaBar): return 100000000000000;   
                case(PressureUnits.GigaPascal): return 1000000000;   
                case(PressureUnits.GigaPsi): return 6895000000000;   
                case(PressureUnits.GigaTorr): return 133322000000;   
                case(PressureUnits.KiloBar): return 100000000;   
                case(PressureUnits.KiloPascal): return 1000;   
                case(PressureUnits.KiloPsi): return 6895000;   
                case(PressureUnits.KiloTorr): return 133322;   
                case(PressureUnits.MegaBar): return 100000000000;   
                case(PressureUnits.MegaPascal): return 1000000;   
                case(PressureUnits.MegaPsi): return 6895000000;   
                case(PressureUnits.MegaTorr): return 133322000;   
                case(PressureUnits.MicroBar): return 0.1;   
                case(PressureUnits.MicroPascal): return 1E-06;   
                case(PressureUnits.MicroPsi): return 0.006895;   
                case(PressureUnits.MicroTorr): return 0.000133322;   
                case(PressureUnits.MilliBar): return 100;   
                case(PressureUnits.MilliPascal): return 0.001;   
                case(PressureUnits.MilliPsi): return 6.895;   
                case(PressureUnits.MilliTorr): return 0.133322;   
                case(PressureUnits.NanoBar): return 0.0001;   
                case(PressureUnits.NanoPascal): return 1E-09;   
                case(PressureUnits.NanoPsi): return 6.895E-06;   
                case(PressureUnits.NanoTorr): return 1.33322E-07;   
                case(PressureUnits.Pascal): return 1;   
                case(PressureUnits.Psi): return 6895;   
                case(PressureUnits.Torr): return 133.322;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this PressureUnits units)
        {
            switch(units)
            {  
                case(PressureUnits.Atmosphere): return @"(?:atm(?:osphere)?)";   
                case(PressureUnits.Bar): return @"(?:bar)";   
                case(PressureUnits.CentiBar): return @"(?:centi(?:bar))";   
                case(PressureUnits.CentiPascal): return @"(?:centi(?:pasc(?:al)?))";   
                case(PressureUnits.CentiPsi): return @"(?:centi(?:psi))";   
                case(PressureUnits.CentiTorr): return @"(?:centi(?:torr))";   
                case(PressureUnits.DeciBar): return @"(?:deci(?:bar))";   
                case(PressureUnits.DeciPascal): return @"(?:deci(?:pasc(?:al)?))";   
                case(PressureUnits.DeciPsi): return @"(?:deci(?:psi))";   
                case(PressureUnits.DeciTorr): return @"(?:deci(?:torr))";   
                case(PressureUnits.GigaBar): return @"(?:giga(?:bar))";   
                case(PressureUnits.GigaPascal): return @"(?:giga(?:pasc(?:al)?))";   
                case(PressureUnits.GigaPsi): return @"(?:giga(?:psi))";   
                case(PressureUnits.GigaTorr): return @"(?:giga(?:torr))";   
                case(PressureUnits.KiloBar): return @"(?:kilo(?:bar)|k(?:bar))";   
                case(PressureUnits.KiloPascal): return @"(?:kilo(?:pasc(?:al)?)|k(?:pasc(?:al)?))";   
                case(PressureUnits.KiloPsi): return @"(?:kilo(?:psi)|k(?:psi))";   
                case(PressureUnits.KiloTorr): return @"(?:kilo(?:torr)|k(?:torr))";   
                case(PressureUnits.MegaBar): return @"(?:mega(?:bar))";   
                case(PressureUnits.MegaPascal): return @"(?:mega(?:pasc(?:al)?))";   
                case(PressureUnits.MegaPsi): return @"(?:mega(?:psi))";   
                case(PressureUnits.MegaTorr): return @"(?:mega(?:torr))";   
                case(PressureUnits.MicroBar): return @"(?:micro(?:bar))";   
                case(PressureUnits.MicroPascal): return @"(?:micro(?:pasc(?:al)?))";   
                case(PressureUnits.MicroPsi): return @"(?:micro(?:psi))";   
                case(PressureUnits.MicroTorr): return @"(?:micro(?:torr))";   
                case(PressureUnits.MilliBar): return @"(?:milli(?:bar))";   
                case(PressureUnits.MilliPascal): return @"(?:milli(?:pasc(?:al)?))";   
                case(PressureUnits.MilliPsi): return @"(?:milli(?:psi))";   
                case(PressureUnits.MilliTorr): return @"(?:milli(?:torr))";   
                case(PressureUnits.NanoBar): return @"(?:nano(?:bar))";   
                case(PressureUnits.NanoPascal): return @"(?:nano(?:pasc(?:al)?))";   
                case(PressureUnits.NanoPsi): return @"(?:nano(?:psi))";   
                case(PressureUnits.NanoTorr): return @"(?:nano(?:torr))";   
                case(PressureUnits.Pascal): return @"(?:pasc(?:al)?)";   
                case(PressureUnits.Psi): return @"(?:psi)";   
                case(PressureUnits.Torr): return @"(?:torr)";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region Temperature
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetDifferentialValue(this TemperatureUnits units)
        {
            switch(units)
            { 
                case(TemperatureUnits.Celsius): return 1;   
                case(TemperatureUnits.Fahrenheit): return 1.8;   
                case(TemperatureUnits.Kelvin): return 1;   
                case(TemperatureUnits.Rankine): return 1.8;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this TemperatureUnits units)
        {
            switch(units)
            {  
                case(TemperatureUnits.Celsius): return @"(?:cel(?:sius)?)";   
                case(TemperatureUnits.Fahrenheit): return @"(?:fahrenheit)";   
                case(TemperatureUnits.Kelvin): return @"(?:k(?:elv(?:in)?)?)";   
                case(TemperatureUnits.Rankine): return @"(?:rankine)";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

     
        #region Time
    					
		/// <summary>
        /// Gets vallue associated with this units
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static double GetValue(this TimeUnits units)
        {
            switch(units)
            { 
                case(TimeUnits.CentiSecond): return 0.01;   
                case(TimeUnits.DeciSecond): return 0.1;   
                case(TimeUnits.GigaSecond): return 1000000000;   
                case(TimeUnits.Hour): return 3600;   
                case(TimeUnits.KiloSecond): return 1000;   
                case(TimeUnits.MegaSecond): return 1000000;   
                case(TimeUnits.MicroSecond): return 1E-06;   
                case(TimeUnits.MilliSecond): return 0.001;   
                case(TimeUnits.Minute): return 60;   
                case(TimeUnits.NanoSecond): return 1E-09;   
                case(TimeUnits.Second): return 1;   
                default:
                    throw new System.NotSupportedException();
            } 
        }		

		/// <summary>
        /// Gets units Regex pattern
        /// </summary>
		/// <exception cref="System.NotSupportedException"></exception>
        public static string GetPattern(this TimeUnits units)
        {
            switch(units)
            {  
                case(TimeUnits.CentiSecond): return @"(?:centi(?:sec(?:ond)?))";   
                case(TimeUnits.DeciSecond): return @"(?:deci(?:sec(?:ond)?))";   
                case(TimeUnits.GigaSecond): return @"(?:giga(?:sec(?:ond)?))";   
                case(TimeUnits.Hour): return @"(?:hour)";   
                case(TimeUnits.KiloSecond): return @"(?:kilo(?:sec(?:ond)?)|k(?:sec(?:ond)?))";   
                case(TimeUnits.MegaSecond): return @"(?:mega(?:sec(?:ond)?))";   
                case(TimeUnits.MicroSecond): return @"(?:micro(?:sec(?:ond)?))";   
                case(TimeUnits.MilliSecond): return @"(?:milli(?:sec(?:ond)?))";   
                case(TimeUnits.Minute): return @"(?:min(?:ute?)?)";   
                case(TimeUnits.NanoSecond): return @"(?:nano(?:sec(?:ond)?))";   
                case(TimeUnits.Second): return @"(?:sec(?:ond)?)";   
                default:
                    throw new System.NotSupportedException();
            } 
        }
        #endregion

    	
    }
	#endregion Enumeration Extensions

	#region Units Class
	/// <summary>
    /// Units utilities
    /// </summary>
    public static partial class Units
    {
		/// <summary>
        /// Converts the string representation of physical units to one of the Units enumeration equivalent.
        /// </summary>
		/// <exception cref="System.FormatException"></exception>
        public static object Parse(string s)
        {
			object units = null;
			if( TryParse(s, out units) ){ return units; }
            throw new System.FormatException();
        }

		/// <summary>
        /// Converts the string representation of physical units to one of the Units enumeration equivalent.
        /// </summary>
		/// <exception cref="System.FormatException"></exception>
		/// <exception cref="System.InvalidCastException"></exception>
        public static T Parse<T>(string s) where T : struct { return (T)Parse(s); }
			
		/// <summary>
        /// Converts the string representation of physical units to one of the Units enumeration equivalent.
        /// </summary>
        public static bool TryParse<T>(string s, out T units) where T : struct
        {			
			units = default(T);
			object obj = null;
			if( false == TryParse(s, out obj)) { return false; }
			if( false == obj is T){ return false; }
			units = (T)obj;
			return true;
        }

		/// <summary>
        /// Converts the string representation of physical units to one of the Units enumeration equivalent.
        /// </summary>
        public static bool TryParse(string s, out object units)
        {
			units = null;
     
            #region Energy 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:cal(?:orie)?)\s*$")){ units = EnergyUnits.Calorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.CentiCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:joule?))\s*$")){ units = EnergyUnits.CentiJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.DeciCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:joule?))\s*$")){ units = EnergyUnits.DeciJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:erg)\s*$")){ units = EnergyUnits.Erg; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:evolt)\s*$")){ units = EnergyUnits.Evolt; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.GigaCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:joule?))\s*$")){ units = EnergyUnits.GigaJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:joule?)\s*$")){ units = EnergyUnits.Joule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:cal(?:orie)?)|k(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.KiloCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:joule?)|k(?:joule?))\s*$")){ units = EnergyUnits.KiloJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.MegaCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:joule?))\s*$")){ units = EnergyUnits.MegaJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.MicroCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:joule?))\s*$")){ units = EnergyUnits.MicroJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.MilliCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:joule?))\s*$")){ units = EnergyUnits.MilliJoule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:cal(?:orie)?))\s*$")){ units = EnergyUnits.NanoCalorie; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:joule?))\s*$")){ units = EnergyUnits.NanoJoule; return true; }   
            #endregion  
            #region Length 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:angstrom)\s*$")){ units = LengthUnits.Angstrom; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:meter|m))\s*$")){ units = LengthUnits.CentiMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:meter|m))\s*$")){ units = LengthUnits.DeciMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:meter|m))\s*$")){ units = LengthUnits.GigaMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:meter|m)|k(?:meter|m))\s*$")){ units = LengthUnits.KiloMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:meter|m))\s*$")){ units = LengthUnits.MegaMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:meter|m)\s*$")){ units = LengthUnits.Meter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:meter|m))\s*$")){ units = LengthUnits.MicroMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:meter|m))\s*$")){ units = LengthUnits.MilliMeter; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:meter|m))\s*$")){ units = LengthUnits.NanoMeter; return true; }   
            #endregion  
            #region Mass 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:gram))\s*$")){ units = MassUnits.CentiGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:ton(?:ne?)?))\s*$")){ units = MassUnits.CentiTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:gram))\s*$")){ units = MassUnits.DeciGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:ton(?:ne?)?))\s*$")){ units = MassUnits.DeciTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:gram))\s*$")){ units = MassUnits.GigaGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:ton(?:ne?)?))\s*$")){ units = MassUnits.GigaTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:gram)\s*$")){ units = MassUnits.Gram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:gram)|k(?:gram))\s*$")){ units = MassUnits.KiloGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:ton(?:ne?)?)|k(?:ton(?:ne?)?))\s*$")){ units = MassUnits.KiloTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:gram))\s*$")){ units = MassUnits.MegaGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:ton(?:ne?)?))\s*$")){ units = MassUnits.MegaTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:gram))\s*$")){ units = MassUnits.MicroGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:ton(?:ne?)?))\s*$")){ units = MassUnits.MicroTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:gram))\s*$")){ units = MassUnits.MilliGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:ton(?:ne?)?))\s*$")){ units = MassUnits.MilliTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:gram))\s*$")){ units = MassUnits.NanoGram; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:ton(?:ne?)?))\s*$")){ units = MassUnits.NanoTonne; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:ton(?:ne?)?)\s*$")){ units = MassUnits.Tonne; return true; }   
            #endregion  
            #region MolarAmount 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:mole?))\s*$")){ units = MolarAmountUnits.CentiMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:mole?))\s*$")){ units = MolarAmountUnits.DeciMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:mole?))\s*$")){ units = MolarAmountUnits.GigaMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:mole?)|k(?:mole?))\s*$")){ units = MolarAmountUnits.KiloMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:mole?))\s*$")){ units = MolarAmountUnits.MegaMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:mole?))\s*$")){ units = MolarAmountUnits.MicroMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:mole?))\s*$")){ units = MolarAmountUnits.MilliMole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mole?)\s*$")){ units = MolarAmountUnits.Mole; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:molec(?:ule)?)\s*$")){ units = MolarAmountUnits.Molecule; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:mole?))\s*$")){ units = MolarAmountUnits.NanoMole; return true; }   
            #endregion  
            #region Pressure 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:atm(?:osphere)?)\s*$")){ units = PressureUnits.Atmosphere; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:bar)\s*$")){ units = PressureUnits.Bar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:bar))\s*$")){ units = PressureUnits.CentiBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:pasc(?:al)?))\s*$")){ units = PressureUnits.CentiPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:psi))\s*$")){ units = PressureUnits.CentiPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:torr))\s*$")){ units = PressureUnits.CentiTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:bar))\s*$")){ units = PressureUnits.DeciBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:pasc(?:al)?))\s*$")){ units = PressureUnits.DeciPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:psi))\s*$")){ units = PressureUnits.DeciPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:torr))\s*$")){ units = PressureUnits.DeciTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:bar))\s*$")){ units = PressureUnits.GigaBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:pasc(?:al)?))\s*$")){ units = PressureUnits.GigaPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:psi))\s*$")){ units = PressureUnits.GigaPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:torr))\s*$")){ units = PressureUnits.GigaTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:bar)|k(?:bar))\s*$")){ units = PressureUnits.KiloBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:pasc(?:al)?)|k(?:pasc(?:al)?))\s*$")){ units = PressureUnits.KiloPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:psi)|k(?:psi))\s*$")){ units = PressureUnits.KiloPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:torr)|k(?:torr))\s*$")){ units = PressureUnits.KiloTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:bar))\s*$")){ units = PressureUnits.MegaBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:pasc(?:al)?))\s*$")){ units = PressureUnits.MegaPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:psi))\s*$")){ units = PressureUnits.MegaPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:torr))\s*$")){ units = PressureUnits.MegaTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:bar))\s*$")){ units = PressureUnits.MicroBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:pasc(?:al)?))\s*$")){ units = PressureUnits.MicroPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:psi))\s*$")){ units = PressureUnits.MicroPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:torr))\s*$")){ units = PressureUnits.MicroTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:bar))\s*$")){ units = PressureUnits.MilliBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:pasc(?:al)?))\s*$")){ units = PressureUnits.MilliPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:psi))\s*$")){ units = PressureUnits.MilliPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:torr))\s*$")){ units = PressureUnits.MilliTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:bar))\s*$")){ units = PressureUnits.NanoBar; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:pasc(?:al)?))\s*$")){ units = PressureUnits.NanoPascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:psi))\s*$")){ units = PressureUnits.NanoPsi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:torr))\s*$")){ units = PressureUnits.NanoTorr; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:pasc(?:al)?)\s*$")){ units = PressureUnits.Pascal; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:psi)\s*$")){ units = PressureUnits.Psi; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:torr)\s*$")){ units = PressureUnits.Torr; return true; }   
            #endregion  
            #region Temperature 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:cel(?:sius)?)\s*$")){ units = TemperatureUnits.Celsius; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:fahrenheit)\s*$")){ units = TemperatureUnits.Fahrenheit; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:k(?:elv(?:in)?)?)\s*$")){ units = TemperatureUnits.Kelvin; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:rankine)\s*$")){ units = TemperatureUnits.Rankine; return true; }   
            #endregion  
            #region Time 
    		 
            if( Regex.IsMatch(s, @"(?i)^\s*(?:centi(?:sec(?:ond)?))\s*$")){ units = TimeUnits.CentiSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:deci(?:sec(?:ond)?))\s*$")){ units = TimeUnits.DeciSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:giga(?:sec(?:ond)?))\s*$")){ units = TimeUnits.GigaSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:hour)\s*$")){ units = TimeUnits.Hour; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:kilo(?:sec(?:ond)?)|k(?:sec(?:ond)?))\s*$")){ units = TimeUnits.KiloSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:mega(?:sec(?:ond)?))\s*$")){ units = TimeUnits.MegaSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:micro(?:sec(?:ond)?))\s*$")){ units = TimeUnits.MicroSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:milli(?:sec(?:ond)?))\s*$")){ units = TimeUnits.MilliSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:min(?:ute?)?)\s*$")){ units = TimeUnits.Minute; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:nano(?:sec(?:ond)?))\s*$")){ units = TimeUnits.NanoSecond; return true; }  
            if( Regex.IsMatch(s, @"(?i)^\s*(?:sec(?:ond)?)\s*$")){ units = TimeUnits.Second; return true; }   
            #endregion  
            return false;
        }
 
     
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(EnergyUnits from, EnergyUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(LengthUnits from, LengthUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(MassUnits from, MassUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(MolarAmountUnits from, MolarAmountUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(PressureUnits from, PressureUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
		/// <summary>
        /// Calculates the first derivatives ratio for the given pair of units
        /// </summary>
        public static double GetDerivativesRatio(TemperatureUnits from, TemperatureUnits to)
        {
            return from.GetDifferentialValue() / to.GetDifferentialValue();
        }  
		/// <summary>
        /// Calculates  conversion factor for the given pair of units
        /// </summary>
        public static double GetConversionFactor(TimeUnits from, TimeUnits to)
        {
            return from.GetValue() / to.GetValue();
        }  
    }

	#endregion Units Class	

	#region Type Converter

	/// <summary>
    /// Provides a type converter to convert Physical Quantity objects to and from various other representations.
    /// </summary>
	public class PhysicalQuantityTypeConverter : TypeConverter
    {
		/// <summary>
        /// Returns whether this converter can convert an object of the given type to the type of this converter, using the specified context.
        /// </summary>
        /// <param name="context">An System.ComponentModel.ITypeDescriptorContext that provides a format context.</param>
        /// <param name="sourceType">A System.Type that represents the type you want to convert from.</param>
        /// <returns>true if this converter can perform the conversion; otherwise, false.</returns>
		public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType)
        {
            if (sourceType == typeof(string)) { return true; }
            return base.CanConvertFrom(context, sourceType);
        }
	
		/// <summary>
        /// Converts the given object to the type of this converter, using the specified context and culture information.
        /// </summary>
        /// <param name="context">An System.ComponentModel.ITypeDescriptorContext that provides a format context.</param>
        /// <param name="culture">The System.Globalization.CultureInfo to use as the current culture.</param>
        /// <param name="obj">The System.Object to convert.</param>
        /// <returns>An System.Object that represents the converted value.</returns>
        /// <exception cref="System.NotSupportedException">The conversion cannot be performed</exception>
		public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object obj)
        {
            if (obj is string)
            {
				string s = (string)obj;
				Match match = QuantityPlaceHoldersRegex.Match(s);
				if( false == match.Success) { return null; }
				Capture cprValue = match.Groups["value"];
                Capture cprUnits = match.Groups["units"];
				
				double value = 0.0;
				object units = null;
				
				if( double.TryParse(cprValue.Value, out value) &&
					Units.TryParse(cprUnits.Value, out units))
				{  
					if( units is EnergyUnits) { return new Energy(value, (EnergyUnits)units); }  
					if( units is LengthUnits) { return new Length(value, (LengthUnits)units); }  
					if( units is MassUnits) { return new Mass(value, (MassUnits)units); }  
					if( units is MolarAmountUnits) { return new MolarAmount(value, (MolarAmountUnits)units); }  
					if( units is PressureUnits) { return new Pressure(value, (PressureUnits)units); }  
					if( units is TemperatureUnits) { return new Temperature(value, (TemperatureUnits)units); }  
					if( units is TimeUnits) { return new Time(value, (TimeUnits)units); }  
				}
				return null;
            }
            return base.ConvertFrom(context, culture, obj);
        }		
	
		/// <summary>
        /// Regular expression matching the quantity value and units place holders
        /// </summary>
        public static readonly Regex QuantityPlaceHoldersRegex = new Regex(
				@"^\s*
					(?<value>(?:[+-]?(?:(?:(?:(?:\d+\.?\d*)|(?:\.\d+))(?:[e][+-]?\d{1,3})?))))
					\s*(?:(?<units>\w+)|(?:[[]\s*(?<units>\w+)[]]))\s*$"
					,RegexOptions.IgnoreCase | RegexOptions.IgnorePatternWhitespace
			);
    }

	#endregion

	
	#region Basic Physical Quantities
	
	
		
	///<summary>
	/// Energy (default units: Joule)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Energy : IEquatable<Energy>, IRoughlyEquatable<Energy>, IComparable<Energy>
	{
		/// <summary>
        /// 0 [Joule]
        /// </summary>
		public static Energy Default { get { return new Energy(0, EnergyUnits.Joule); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		EnergyUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Energy physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Energy object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Energy Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Energy? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Energy physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Energy physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Energy representation to convert.</param>
        /// <param name="value">When this method returns, contains the Energy object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Energy in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Energy? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			EnergyUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<EnergyUnits>(cprUnits.Value, out units))
			{	
				value =  new Energy(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Energy objects constructed based on the given EnergyUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Energy objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Energy objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Energy[] CreateArray(EnergyUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Energy[] array = new Energy[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Energy(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Energy objects constructed based on the given EnergyUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Energy objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Energy objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Energy> CreateCollection(EnergyUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Energy(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for energy quantity
        /// </summary>
		public static IEnumerable<EnergyUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(EnergyUnits)).Cast<EnergyUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Joule] Energy default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const EnergyUnits DefaultUnits = EnergyUnits.Joule;

		///<summary>
		/// Gets or sets the Energy dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the energy quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The energy quantity value in the specified units</returns>
        public double this[EnergyUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Energy units. Setting another units results in the change of this Energy Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public EnergyUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(EnergyUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional energy using [Joule] as the default units
		///</summary>
		[DebuggerHidden()]
        public Energy(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Energy type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Energy(double value, EnergyUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Energy to the Energy in the given units
		///</summary>
		[DebuggerHidden()]
		public Energy Convert(EnergyUnits units)
        {
			Energy other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Energy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Energy def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional energy 
		/// given in the [Joule] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Energy(double value)
        {
            return new Energy(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional energy to the 
		/// real number given in the [Joule] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Energy physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Joule (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Energy.DefaultUnits).Value; 
		}

		#region IEquatable<Energy> Members

		///<summary>
		/// Indicates whether this Energy instance and the specified Energy are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Energy other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Energy,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Energy object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Energy object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Energy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Energy> Members

		///<summary>
		/// Compares this Energy instance with a specified Energy object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Energy
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Energy other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Energy instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Energy)
            {
                return this.Equals((Energy)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Energy a, Energy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Energy a, Energy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Energy a, Energy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Energy a, Energy b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// Length (default units: Meter)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Length : IEquatable<Length>, IRoughlyEquatable<Length>, IComparable<Length>
	{
		/// <summary>
        /// 0 [Meter]
        /// </summary>
		public static Length Default { get { return new Length(0, LengthUnits.Meter); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		LengthUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Length physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Length object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Length Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Length? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Length physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Length physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Length representation to convert.</param>
        /// <param name="value">When this method returns, contains the Length object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Length in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Length? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			LengthUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<LengthUnits>(cprUnits.Value, out units))
			{	
				value =  new Length(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Length objects constructed based on the given LengthUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Length objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Length objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Length[] CreateArray(LengthUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Length[] array = new Length[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Length(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Length objects constructed based on the given LengthUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Length objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Length objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Length> CreateCollection(LengthUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Length(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for length quantity
        /// </summary>
		public static IEnumerable<LengthUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(LengthUnits)).Cast<LengthUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Meter] Length default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const LengthUnits DefaultUnits = LengthUnits.Meter;

		///<summary>
		/// Gets or sets the Length dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the length quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The length quantity value in the specified units</returns>
        public double this[LengthUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Length units. Setting another units results in the change of this Length Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public LengthUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(LengthUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional length using [Meter] as the default units
		///</summary>
		[DebuggerHidden()]
        public Length(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Length type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Length(double value, LengthUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Length to the Length in the given units
		///</summary>
		[DebuggerHidden()]
		public Length Convert(LengthUnits units)
        {
			Length other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Length instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Length def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional length 
		/// given in the [Meter] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Length(double value)
        {
            return new Length(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional length to the 
		/// real number given in the [Meter] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Length physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Meter (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Length.DefaultUnits).Value; 
		}

		#region IEquatable<Length> Members

		///<summary>
		/// Indicates whether this Length instance and the specified Length are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Length other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Length,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Length object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Length object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Length other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Length> Members

		///<summary>
		/// Compares this Length instance with a specified Length object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Length
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Length other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Length instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Length)
            {
                return this.Equals((Length)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Length a, Length b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Length a, Length b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Length a, Length b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Length a, Length b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// Mass (default units: KiloGram)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Mass : IEquatable<Mass>, IRoughlyEquatable<Mass>, IComparable<Mass>
	{
		/// <summary>
        /// 0 [KiloGram]
        /// </summary>
		public static Mass Default { get { return new Mass(0, MassUnits.KiloGram); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		MassUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Mass physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Mass object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Mass Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Mass? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Mass physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Mass physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Mass representation to convert.</param>
        /// <param name="value">When this method returns, contains the Mass object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Mass in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Mass? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			MassUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<MassUnits>(cprUnits.Value, out units))
			{	
				value =  new Mass(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Mass objects constructed based on the given MassUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Mass objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Mass objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Mass[] CreateArray(MassUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Mass[] array = new Mass[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Mass(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Mass objects constructed based on the given MassUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Mass objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Mass objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Mass> CreateCollection(MassUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Mass(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for mass quantity
        /// </summary>
		public static IEnumerable<MassUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(MassUnits)).Cast<MassUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [KiloGram] Mass default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const MassUnits DefaultUnits = MassUnits.KiloGram;

		///<summary>
		/// Gets or sets the Mass dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the mass quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The mass quantity value in the specified units</returns>
        public double this[MassUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Mass units. Setting another units results in the change of this Mass Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public MassUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(MassUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional mass using [KiloGram] as the default units
		///</summary>
		[DebuggerHidden()]
        public Mass(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Mass type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Mass(double value, MassUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Mass to the Mass in the given units
		///</summary>
		[DebuggerHidden()]
		public Mass Convert(MassUnits units)
        {
			Mass other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Mass instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Mass def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional mass 
		/// given in the [KiloGram] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Mass(double value)
        {
            return new Mass(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional mass to the 
		/// real number given in the [KiloGram] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Mass physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the KiloGram (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Mass.DefaultUnits).Value; 
		}

		#region IEquatable<Mass> Members

		///<summary>
		/// Indicates whether this Mass instance and the specified Mass are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Mass other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Mass,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Mass object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Mass object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Mass other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Mass> Members

		///<summary>
		/// Compares this Mass instance with a specified Mass object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Mass
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Mass other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Mass instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Mass)
            {
                return this.Equals((Mass)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Mass a, Mass b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Mass a, Mass b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Mass a, Mass b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Mass a, Mass b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// MolarAmount (default units: Mole)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarAmount : IEquatable<MolarAmount>, IRoughlyEquatable<MolarAmount>, IComparable<MolarAmount>
	{
		/// <summary>
        /// 0 [Mole]
        /// </summary>
		public static MolarAmount Default { get { return new MolarAmount(0, MolarAmountUnits.Mole); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		MolarAmountUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the MolarAmount physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>MolarAmount object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static MolarAmount Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			MolarAmount? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the MolarAmount physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the MolarAmount physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a MolarAmount representation to convert.</param>
        /// <param name="value">When this method returns, contains the MolarAmount object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a MolarAmount in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out MolarAmount? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			MolarAmountUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<MolarAmountUnits>(cprUnits.Value, out units))
			{	
				value =  new MolarAmount(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of MolarAmount objects constructed based on the given MolarAmountUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of MolarAmount objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of MolarAmount objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static MolarAmount[] CreateArray(MolarAmountUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			MolarAmount[] array = new MolarAmount[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new MolarAmount(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of MolarAmount objects constructed based on the given MolarAmountUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of MolarAmount objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of MolarAmount objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<MolarAmount> CreateCollection(MolarAmountUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new MolarAmount(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for molaramount quantity
        /// </summary>
		public static IEnumerable<MolarAmountUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(MolarAmountUnits)).Cast<MolarAmountUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Mole] MolarAmount default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const MolarAmountUnits DefaultUnits = MolarAmountUnits.Mole;

		///<summary>
		/// Gets or sets the MolarAmount dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the molaramount quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The molaramount quantity value in the specified units</returns>
        public double this[MolarAmountUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this MolarAmount units. Setting another units results in the change of this MolarAmount Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public MolarAmountUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(MolarAmountUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional molaramount using [Mole] as the default units
		///</summary>
		[DebuggerHidden()]
        public MolarAmount(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the MolarAmount type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public MolarAmount(double value, MolarAmountUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this MolarAmount to the MolarAmount in the given units
		///</summary>
		[DebuggerHidden()]
		public MolarAmount Convert(MolarAmountUnits units)
        {
			MolarAmount other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this MolarAmount instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            MolarAmount def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional molaramount 
		/// given in the [Mole] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator MolarAmount(double value)
        {
            return new MolarAmount(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional molaramount to the 
		/// real number given in the [Mole] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(MolarAmount physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Mole (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(MolarAmount.DefaultUnits).Value; 
		}

		#region IEquatable<MolarAmount> Members

		///<summary>
		/// Indicates whether this MolarAmount instance and the specified MolarAmount are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(MolarAmount other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<MolarAmount,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An MolarAmount object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current MolarAmount object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(MolarAmount other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<MolarAmount> Members

		///<summary>
		/// Compares this MolarAmount instance with a specified MolarAmount object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified MolarAmount
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(MolarAmount other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this MolarAmount instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarAmount)
            {
                return this.Equals((MolarAmount)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(MolarAmount a, MolarAmount b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarAmount a, MolarAmount b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarAmount a, MolarAmount b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarAmount a, MolarAmount b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// Pressure (default units: Pascal)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Pressure : IEquatable<Pressure>, IRoughlyEquatable<Pressure>, IComparable<Pressure>
	{
		/// <summary>
        /// 101325 [Pascal]
        /// </summary>
		public static Pressure Default { get { return new Pressure(101325, PressureUnits.Pascal); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		PressureUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Pressure physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Pressure object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Pressure Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Pressure? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Pressure physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Pressure physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Pressure representation to convert.</param>
        /// <param name="value">When this method returns, contains the Pressure object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Pressure in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Pressure? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			PressureUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<PressureUnits>(cprUnits.Value, out units))
			{	
				value =  new Pressure(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Pressure objects constructed based on the given PressureUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Pressure objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Pressure objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Pressure[] CreateArray(PressureUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Pressure[] array = new Pressure[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Pressure(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Pressure objects constructed based on the given PressureUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Pressure objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Pressure objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Pressure> CreateCollection(PressureUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Pressure(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for pressure quantity
        /// </summary>
		public static IEnumerable<PressureUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(PressureUnits)).Cast<PressureUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Pascal] Pressure default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const PressureUnits DefaultUnits = PressureUnits.Pascal;

		///<summary>
		/// Gets or sets the Pressure dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the pressure quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The pressure quantity value in the specified units</returns>
        public double this[PressureUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Pressure units. Setting another units results in the change of this Pressure Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public PressureUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(PressureUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional pressure using [Pascal] as the default units
		///</summary>
		[DebuggerHidden()]
        public Pressure(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Pressure type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Pressure(double value, PressureUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Pressure to the Pressure in the given units
		///</summary>
		[DebuggerHidden()]
		public Pressure Convert(PressureUnits units)
        {
			Pressure other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Pressure instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Pressure def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional pressure 
		/// given in the [Pascal] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Pressure(double value)
        {
            return new Pressure(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional pressure to the 
		/// real number given in the [Pascal] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Pressure physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Pascal (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Pressure.DefaultUnits).Value; 
		}

		#region IEquatable<Pressure> Members

		///<summary>
		/// Indicates whether this Pressure instance and the specified Pressure are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Pressure other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Pressure,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Pressure object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Pressure object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Pressure other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Pressure> Members

		///<summary>
		/// Compares this Pressure instance with a specified Pressure object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Pressure
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Pressure other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Pressure instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Pressure)
            {
                return this.Equals((Pressure)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Pressure a, Pressure b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Pressure a, Pressure b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Pressure a, Pressure b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Pressure a, Pressure b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// Temperature (default units: Kelvin)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Temperature : IEquatable<Temperature>, IRoughlyEquatable<Temperature>, IComparable<Temperature>
	{
		/// <summary>
        /// 298.15 [Kelvin]
        /// </summary>
		public static Temperature Default { get { return new Temperature(298.15, TemperatureUnits.Kelvin); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		TemperatureUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Temperature physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Temperature object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Temperature Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Temperature? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Temperature physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Temperature physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Temperature representation to convert.</param>
        /// <param name="value">When this method returns, contains the Temperature object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Temperature in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Temperature? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			TemperatureUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<TemperatureUnits>(cprUnits.Value, out units))
			{	
				value =  new Temperature(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Temperature objects constructed based on the given TemperatureUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Temperature objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Temperature objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Temperature[] CreateArray(TemperatureUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Temperature[] array = new Temperature[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Temperature(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Temperature objects constructed based on the given TemperatureUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Temperature objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Temperature objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Temperature> CreateCollection(TemperatureUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Temperature(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for temperature quantity
        /// </summary>
		public static IEnumerable<TemperatureUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(TemperatureUnits)).Cast<TemperatureUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Kelvin] Temperature default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const TemperatureUnits DefaultUnits = TemperatureUnits.Kelvin;

		///<summary>
		/// Gets or sets the Temperature dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the temperature quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The temperature quantity value in the specified units</returns>
        public double this[TemperatureUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Temperature units. Setting another units results in the change of this Temperature Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public TemperatureUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
		private void Apply(TemperatureUnits newUnits)
        {
            if( m_units == newUnits ){ return; }
			
			switch( m_units )
			{
			
						
				case(TemperatureUnits.Celsius):
					switch(newUnits)
					{
											
						case(TemperatureUnits.Fahrenheit):
							this.Value = 1.8 * this.Value + (31.9999999999999);
							break;
						
											
						case(TemperatureUnits.Kelvin):
							this.Value = this.Value + (273.15);
							break;
						
											
						case(TemperatureUnits.Rankine):
							this.Value = 1.8 * this.Value + (491.67);
							break;
						
											
						default:
							throw new NotSupportedException(newUnits.ToString());
					}
				
				break;
			
						
				case(TemperatureUnits.Fahrenheit):
					switch(newUnits)
					{
											
						case(TemperatureUnits.Celsius):
							this.Value = 0.555555555555556 * this.Value + (-17.7777777777777);
							break;
						
											
						case(TemperatureUnits.Kelvin):
							this.Value = 0.555555555555556 * this.Value + (255.372222222222);
							break;
						
											
						case(TemperatureUnits.Rankine):
							this.Value = this.Value + (459.67);
							break;
						
											
						default:
							throw new NotSupportedException(newUnits.ToString());
					}
				
				break;
			
						
				case(TemperatureUnits.Kelvin):
					switch(newUnits)
					{
											
						case(TemperatureUnits.Celsius):
							this.Value = this.Value + (-273.15);
							break;
						
											
						case(TemperatureUnits.Fahrenheit):
							this.Value = 1.8 * this.Value + (-459.67);
							break;
						
											
						case(TemperatureUnits.Rankine):
							this.Value = 1.8 * this.Value + (0);
							break;
						
											
						default:
							throw new NotSupportedException(newUnits.ToString());
					}
				
				break;
			
						
				case(TemperatureUnits.Rankine):
					switch(newUnits)
					{
											
						case(TemperatureUnits.Celsius):
							this.Value = 0.555555555555556 * this.Value + (-273.15);
							break;
						
											
						case(TemperatureUnits.Fahrenheit):
							this.Value = this.Value + (-459.67);
							break;
						
											
						case(TemperatureUnits.Kelvin):
							this.Value = 0.555555555555556 * this.Value + (0);
							break;
						
											
						default:
							throw new NotSupportedException(newUnits.ToString());
					}
				
				break;
			
						
				default:
					throw new NotSupportedException(m_units.ToString());
			}
			
			m_units = newUnits;
        }
		
		
		///<summary>
		/// Creates an instance of the dimensional temperature using [Kelvin] as the default units
		///</summary>
		[DebuggerHidden()]
        public Temperature(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Temperature type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Temperature(double value, TemperatureUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Temperature to the Temperature in the given units
		///</summary>
		[DebuggerHidden()]
		public Temperature Convert(TemperatureUnits units)
        {
			Temperature other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Temperature instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Temperature def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional temperature 
		/// given in the [Kelvin] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Temperature(double value)
        {
            return new Temperature(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional temperature to the 
		/// real number given in the [Kelvin] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Temperature physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Kelvin (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Temperature.DefaultUnits).Value; 
		}

		#region IEquatable<Temperature> Members

		///<summary>
		/// Indicates whether this Temperature instance and the specified Temperature are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Temperature other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Temperature,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Temperature object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Temperature object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Temperature other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Temperature> Members

		///<summary>
		/// Compares this Temperature instance with a specified Temperature object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Temperature
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Temperature other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Temperature instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Temperature)
            {
                return this.Equals((Temperature)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Temperature a, Temperature b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Temperature a, Temperature b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Temperature a, Temperature b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Temperature a, Temperature b) { return a.CompareTo(b) < 0; }
	}
	
		
	///<summary>
	/// Time (default units: Second)
	///</summary>
	[Serializable]
	[TypeConverter(typeof(PhysicalQuantityTypeConverter))]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Time : IEquatable<Time>, IRoughlyEquatable<Time>, IComparable<Time>
	{
		/// <summary>
        /// 0 [Second]
        /// </summary>
		public static Time Default { get { return new Time(0, TimeUnits.Second); } }
	
		#region Private Fields
		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		TimeUnits m_units;		

		[DebuggerBrowsable(DebuggerBrowsableState.Never)]
		double m_value;
		#endregion
		
		#region Partial Methods
		partial void ValueChanging(double newValue);
		#endregion
		
		#region Static Methods
		/// <summary>
        /// Converts the string representation of the Time physical quantity to its Nature type equivalent.
        /// </summary>
        /// <param name="s">A string that contains a number to convert.</param>
        /// <returns>Time object that is equivalent to the s-string representation</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		/// <exception cref="System.FormatException"></exception>
		public static Time Parse(string s)
		{
			if (s == null) { throw new ArgumentNullException("s"); }
			Time? output;
			if( TryParse(s, out output) )
			{
				return output.Value;
			}
			throw new System.FormatException("Invalid string representation of the Time physical quantity");
		}
		
		/// <summary>
        /// Converts the string representation of an equivalent of the Time physical quantity. A return value indicates whether the conversion succeeded or failed.
        /// </summary>
        /// <param name="s">A string containing a Time representation to convert.</param>
        /// <param name="value">When this method returns, contains the Time object
        /// equivalent to the s parameter, if the conversion succeeded, or zero if the
        /// conversion failed. The conversion fails if the s parameter is null or is not
        /// a Time in a valid format. This parameter is passed uninitialized.</param>
        /// <returns>true if s was converted successfully; otherwise, false.</returns>
		public static bool TryParse(string s, out Time? value)
        {			
			value = null;
			if( s == null) { return false; }
			Match match = PhysicalQuantityTypeConverter.QuantityPlaceHoldersRegex.Match(s);
			if( false == match.Success) { return false; }
			Capture cprValue = match.Groups["value"];
            Capture cprUnits = match.Groups["units"];
				
			double dimValue = 0.0;
			TimeUnits units;
				
			if( double.TryParse(cprValue.Value, out dimValue) && Nature.Units.TryParse<TimeUnits>(cprUnits.Value, out units))
			{	
				value =  new Time(dimValue, units);
				return true;
			}
            
            return false;
        }
			
		/// <summary>
        /// Creates an array of Time objects constructed based on the given TimeUnits-units parameter 
		/// and the array of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting array of Time objects </param>
        /// <param name="values">Array of double presition values</param>
        /// <returns>Array of Time objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static Time[] CreateArray(TimeUnits units, params double[] values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			Time[] array = new Time[values.Length];
			for(int i = 0; i < values.Length; ++i)
			{
				array[i] = new Time(values[i], units);
			}
			return array;
		}
			
		/// <summary>
        /// Creates a new collection of Time objects constructed based on the given TimeUnits-units parameter 
		/// and the collection of double-presision values
        /// </summary>
        /// <param name="units">Units that will be assigned to each item of the resulting collection of Time objects </param>
        /// <param name="values">Collection of double presition values</param>
        /// <returns>Collection of Time objects</returns>
		/// <exception cref="System.ArgumentNullException"></exception>
		public static IEnumerable<Time> CreateCollection(TimeUnits units, IEnumerable<double> values)
		{
			if( values == null){ throw new System.ArgumentNullException("values"); }
			return from v in values select new Time(v, units);
		}
			
		/// <summary>
        /// Gets a collection of all available units values for time quantity
        /// </summary>
		public static IEnumerable<TimeUnits> AllUnits
		{
			get { return Enum.GetValues(typeof(TimeUnits)).Cast<TimeUnits>(); }
		}
			
		#endregion
		
		///<summary>
		/// The [Second] Time default units used in the implicit conversions and the 
		/// constructor accepting the double value as the only parameter
		///</summary>
		public const TimeUnits DefaultUnits = TimeUnits.Second;

		///<summary>
		/// Gets or sets the Time dimensional value
		///</summary>
        public double Value 
		{ 
			get { return m_value; }
			set 
			{
				ValueChanging(value);
				m_value = value;
			}
		}
			
		/// <summary>
        /// Gets the time quantity value converted into the specified units
        /// </summary>
        /// <param name="units">Target units</param>
        /// <returns>The time quantity value in the specified units</returns>
        public double this[TimeUnits units]
        {
            get 
            {
                var converted = this.Convert(units);
                return converted.Value;
            }
        }

		///<summary>
		/// Gets or sets this Time units. Setting another units results in the change of this Time Value-property.
		///</summary>
		///<exception cref="System.NotSupportedException"></exception>
		[DebuggerHidden()]
		public TimeUnits Units
        {
            get { return m_units; }
            set
            {
                this.Apply(value);
            }
        }

        
        private void Apply(TimeUnits newUnits)
        {
            if (m_units != newUnits)
            {
                Value *= Nature.Units.GetConversionFactor(m_units, newUnits);
                m_units = newUnits;
            }
        }

        
		///<summary>
		/// Creates an instance of the dimensional time using [Second] as the default units
		///</summary>
		[DebuggerHidden()]
        public Time(double value)
            : this(value, DefaultUnits){}

		///<summary>
		/// Creates an instance of the Time type using the given value and units
		///</summary>
		[DebuggerHidden()]
        public Time(double value, TimeUnits units)
            : this()
        {
            Value = value;
            m_units = units;
        }


		///<summary>
		/// Converts this Time to the Time in the given units
		///</summary>
		[DebuggerHidden()]
		public Time Convert(TimeUnits units)
        {
			Time other = this;
			other.Apply(units);
            return other;
        }

		

		///<summary>
		/// Returns the hash code for this Time instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            Time def = Convert(DefaultUnits);
            return def.Value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, m_units);
        }

		///<summary>
		/// Implicitely converts the real number to the instance of the dimensional time 
		/// given in the [Second] units
		///</summary>
		[DebuggerHidden()]
        public static implicit operator Time(double value)
        {
            return new Time(value);
        }

		///<summary>
		/// Implicitely converts the given instance of the dimensional time to the 
		/// real number given in the [Second] units
		///</summary>
		[DebuggerHidden()]
		public static implicit operator double(Time physValue)
        {
            return physValue.ToDouble();
        }

		///<summary>
		/// Returns the instance value converted into the Second (default) units
		///</summary>
		public double ToDouble()
		{
			return this.Convert(Time.DefaultUnits).Value; 
		}

		#region IEquatable<Time> Members

		///<summary>
		/// Indicates whether this Time instance and the specified Time are equal.
		///</summary>
		[DebuggerHidden()]
        public bool Equals(Time other)
        {
            return Value == other.Convert(Units).Value;
        }

        #endregion

		#region IRoughlyEquatable<Time,double> Members

		/// <summary>
        /// Indicates whether the current object is roughly equal to another object of the same type.
        /// </summary>
        /// <typeparam name="TTolerance">Generic tolerance type</typeparam>
        /// <param name="other">An Time object to compare with this instance.</param>
        /// <param name="tolerance">A tolerance object determining the comparison accuracy</param>
        /// <returns>true if the current Time object is roughly equal to the other parameter of the same type; otherwise, false.</returns>
        public bool IsSame<TTolerance>(Time other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
            return tolerance.AreSame(this.ToDouble(), other.ToDouble());
        }

        #endregion

		#region IComparable<Time> Members

		///<summary>
		/// Compares this Time instance with a specified Time object and indicates
        /// whether this instance precedes, follows, or appears in the same position
        /// in the sort order as the specified Time
		///</summary>
		[DebuggerHidden()]
        public int CompareTo(Time other)
        {
            double diff = Value - other.Convert(Units).Value;
            return diff == 0.0 ? 0 :
                diff > 0.0 ? (+1) : (-1);
        }

        #endregion

		///<summary>
		/// Indicates whether this Time instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Time)
            {
                return this.Equals((Time)obj);
            }
            return base.Equals(obj);
        }

		[DebuggerHidden()]
		public static bool operator ==(Time a, Time b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Time a, Time b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Time a, Time b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Time a, Time b) { return a.CompareTo(b) < 0; }
	}
	
		
	#endregion Basic Physical Quantities
	
	#region Composite Physical Quantities
	
		
	///<summary>
	/// ArrheniusPrefactor
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct ArrheniusPrefactor : IEquatable<ArrheniusPrefactor>, IComparable<ArrheniusPrefactor>, IRoughlyEquatable<ArrheniusPrefactor>
	{
		partial void OnProcessingOtherObject(ArrheniusPrefactor other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TimeUnits m_timeUnits;     
               
            
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private double m_reactionOrder;     
               
          
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of ArrheniusPrefactor type. Units: [Meter, Mole, Second] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public ArrheniusPrefactor(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public ArrheniusPrefactor(double value, double reactionOrder, LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits, TimeUnits timeUnits) : this()
        {
            this.Value = value;
						
			this.m_reactionOrder = reactionOrder;			
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
						
			this.m_timeUnits = timeUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
						
			this.m_timeUnits = TimeUnits.Second;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), (3 * (ReactionOrder - 1)));
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), (-(ReactionOrder - 1)));
            this.m_molarAmountUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TimeUnits to the given units value
		///</summary>
        private void Apply(TimeUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.TimeUnits, units), -1);
            this.m_timeUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the ArrheniusPrefactor dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this ArrheniusPrefactor Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this ArrheniusPrefactor Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TimeUnits. Setting another units will automatically change this ArrheniusPrefactor Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TimeUnits TimeUnits 
        {
            get { return m_timeUnits; }
            set { Apply(value); }
        }     
               
            
			
				
		public double ReactionOrder
		{
			get { return m_reactionOrder; }
			set
			{
				if( m_reactionOrder != value )
                {
                    this.OnReactionOrderChanging(value);
                }
                m_reactionOrder = value;
			}
		}
			
		partial void OnReactionOrderChanging(double value);		
		
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}", m_lengthUnits, m_molarAmountUnits, m_timeUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new ArrheniusPrefactor instance by converting this instance to the given units
		///</summary>      
        public ArrheniusPrefactor Convert(LengthUnits units)
        {
            ArrheniusPrefactor converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new ArrheniusPrefactor instance by converting this instance to the given units
		///</summary>      
        public ArrheniusPrefactor Convert(MolarAmountUnits units)
        {
            ArrheniusPrefactor converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new ArrheniusPrefactor instance by converting this instance to the given units
		///</summary>      
        public ArrheniusPrefactor Convert(TimeUnits units)
        {
            ArrheniusPrefactor converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new ArrheniusPrefactor instance by converting this instance to the given units
		///</summary> 
        public ArrheniusPrefactor Convert(LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits, TimeUnits timeUnits)
        {
            ArrheniusPrefactor converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(molarAmountUnits);
			
			converted.Apply(timeUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts ArrheniusPrefactor to the double presision value in units of [Meter, Mole, Second] (default)
		/// </summary>
		/// <param name="physValue">An instance of the ArrheniusPrefactor type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, Mole, Second] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(ArrheniusPrefactor physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(MolarAmountUnits.Mole);
			
			physValue.Apply(TimeUnits.Second);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this ArrheniusPrefactor instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is ArrheniusPrefactor)
            {
                return this.Equals((ArrheniusPrefactor)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<ArrheniusPrefactor> Members

        /// <summary>
		/// Indicates whether the current ArrheniusPrefactor object is equal to another ArrheniusPrefactor object
		/// </summary> 
        public bool Equals(ArrheniusPrefactor other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TimeUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<ArrheniusPrefactor> Members

        /// <summary>
		/// Defines a generalized ArrheniusPrefactor comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(ArrheniusPrefactor other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TimeUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<ArrheniusPrefactor,double> Members

        public bool IsSame<TTolerance>(ArrheniusPrefactor other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TimeUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(ArrheniusPrefactor a, ArrheniusPrefactor b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(ArrheniusPrefactor a, ArrheniusPrefactor b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(ArrheniusPrefactor a, ArrheniusPrefactor b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(ArrheniusPrefactor a, ArrheniusPrefactor b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// Diffusivity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Diffusivity : IEquatable<Diffusivity>, IComparable<Diffusivity>, IRoughlyEquatable<Diffusivity>
	{
		partial void OnProcessingOtherObject(Diffusivity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TimeUnits m_timeUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of Diffusivity type. Units: [Meter, Second] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public Diffusivity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public Diffusivity(double value, LengthUnits lengthUnits, TimeUnits timeUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_timeUnits = timeUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_timeUnits = TimeUnits.Second;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), 2);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TimeUnits to the given units value
		///</summary>
        private void Apply(TimeUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.TimeUnits, units), -1);
            this.m_timeUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the Diffusivity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this Diffusivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TimeUnits. Setting another units will automatically change this Diffusivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TimeUnits TimeUnits 
        {
            get { return m_timeUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_lengthUnits, m_timeUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new Diffusivity instance by converting this instance to the given units
		///</summary>      
        public Diffusivity Convert(LengthUnits units)
        {
            Diffusivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new Diffusivity instance by converting this instance to the given units
		///</summary>      
        public Diffusivity Convert(TimeUnits units)
        {
            Diffusivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new Diffusivity instance by converting this instance to the given units
		///</summary> 
        public Diffusivity Convert(LengthUnits lengthUnits, TimeUnits timeUnits)
        {
            Diffusivity converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(timeUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts Diffusivity to the double presision value in units of [Meter, Second] (default)
		/// </summary>
		/// <param name="physValue">An instance of the Diffusivity type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, Second] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(Diffusivity physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(TimeUnits.Second);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this Diffusivity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Diffusivity)
            {
                return this.Equals((Diffusivity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<Diffusivity> Members

        /// <summary>
		/// Indicates whether the current Diffusivity object is equal to another Diffusivity object
		/// </summary> 
        public bool Equals(Diffusivity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<Diffusivity> Members

        /// <summary>
		/// Defines a generalized Diffusivity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(Diffusivity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<Diffusivity,double> Members

        public bool IsSame<TTolerance>(Diffusivity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(Diffusivity a, Diffusivity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Diffusivity a, Diffusivity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Diffusivity a, Diffusivity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Diffusivity a, Diffusivity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MassConcentration
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MassConcentration : IEquatable<MassConcentration>, IComparable<MassConcentration>, IRoughlyEquatable<MassConcentration>
	{
		partial void OnProcessingOtherObject(MassConcentration other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MassConcentration type. Units: [Meter, KiloGram] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MassConcentration(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MassConcentration(double value, LengthUnits lengthUnits, MassUnits massUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_massUnits = massUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_massUnits = MassUnits.KiloGram;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), -3);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), 1);
            this.m_massUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MassConcentration dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this MassConcentration Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this MassConcentration Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_lengthUnits, m_massUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MassConcentration instance by converting this instance to the given units
		///</summary>      
        public MassConcentration Convert(LengthUnits units)
        {
            MassConcentration converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MassConcentration instance by converting this instance to the given units
		///</summary>      
        public MassConcentration Convert(MassUnits units)
        {
            MassConcentration converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MassConcentration instance by converting this instance to the given units
		///</summary> 
        public MassConcentration Convert(LengthUnits lengthUnits, MassUnits massUnits)
        {
            MassConcentration converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(massUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MassConcentration to the double presision value in units of [Meter, KiloGram] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MassConcentration type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, KiloGram] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MassConcentration physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(MassUnits.KiloGram);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MassConcentration instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MassConcentration)
            {
                return this.Equals((MassConcentration)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MassConcentration> Members

        /// <summary>
		/// Indicates whether the current MassConcentration object is equal to another MassConcentration object
		/// </summary> 
        public bool Equals(MassConcentration other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MassUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MassConcentration> Members

        /// <summary>
		/// Defines a generalized MassConcentration comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MassConcentration other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MassUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MassConcentration,double> Members

        public bool IsSame<TTolerance>(MassConcentration other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MassUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MassConcentration a, MassConcentration b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MassConcentration a, MassConcentration b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MassConcentration a, MassConcentration b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MassConcentration a, MassConcentration b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarConcentration
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarConcentration : IEquatable<MolarConcentration>, IComparable<MolarConcentration>, IRoughlyEquatable<MolarConcentration>
	{
		partial void OnProcessingOtherObject(MolarConcentration other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarConcentration type. Units: [Meter, Mole] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarConcentration(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarConcentration(double value, LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), -3);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), 1);
            this.m_molarAmountUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarConcentration dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this MolarConcentration Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarConcentration Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_lengthUnits, m_molarAmountUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarConcentration instance by converting this instance to the given units
		///</summary>      
        public MolarConcentration Convert(LengthUnits units)
        {
            MolarConcentration converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarConcentration instance by converting this instance to the given units
		///</summary>      
        public MolarConcentration Convert(MolarAmountUnits units)
        {
            MolarConcentration converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarConcentration instance by converting this instance to the given units
		///</summary> 
        public MolarConcentration Convert(LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits)
        {
            MolarConcentration converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(molarAmountUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarConcentration to the double presision value in units of [Meter, Mole] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarConcentration type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, Mole] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarConcentration physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(MolarAmountUnits.Mole);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarConcentration instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarConcentration)
            {
                return this.Equals((MolarConcentration)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarConcentration> Members

        /// <summary>
		/// Indicates whether the current MolarConcentration object is equal to another MolarConcentration object
		/// </summary> 
        public bool Equals(MolarConcentration other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarConcentration> Members

        /// <summary>
		/// Defines a generalized MolarConcentration comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarConcentration other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarConcentration,double> Members

        public bool IsSame<TTolerance>(MolarConcentration other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarConcentration a, MolarConcentration b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarConcentration a, MolarConcentration b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarConcentration a, MolarConcentration b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarConcentration a, MolarConcentration b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarEnergy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarEnergy : IEquatable<MolarEnergy>, IComparable<MolarEnergy>, IRoughlyEquatable<MolarEnergy>
	{
		partial void OnProcessingOtherObject(MolarEnergy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarEnergy type. Units: [Joule, Mole] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarEnergy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarEnergy(double value, EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarEnergy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this MolarEnergy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarEnergy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_energyUnits, m_molarAmountUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarEnergy instance by converting this instance to the given units
		///</summary>      
        public MolarEnergy Convert(EnergyUnits units)
        {
            MolarEnergy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarEnergy instance by converting this instance to the given units
		///</summary>      
        public MolarEnergy Convert(MolarAmountUnits units)
        {
            MolarEnergy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarEnergy instance by converting this instance to the given units
		///</summary> 
        public MolarEnergy Convert(EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits)
        {
            MolarEnergy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(molarAmountUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarEnergy to the double presision value in units of [Joule, Mole] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarEnergy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, Mole] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarEnergy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MolarAmountUnits.Mole);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarEnergy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarEnergy)
            {
                return this.Equals((MolarEnergy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarEnergy> Members

        /// <summary>
		/// Indicates whether the current MolarEnergy object is equal to another MolarEnergy object
		/// </summary> 
        public bool Equals(MolarEnergy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarEnergy> Members

        /// <summary>
		/// Defines a generalized MolarEnergy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarEnergy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarEnergy,double> Members

        public bool IsSame<TTolerance>(MolarEnergy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarEnergy a, MolarEnergy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarEnergy a, MolarEnergy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarEnergy a, MolarEnergy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarEnergy a, MolarEnergy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarEnthalpy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarEnthalpy : IEquatable<MolarEnthalpy>, IComparable<MolarEnthalpy>, IRoughlyEquatable<MolarEnthalpy>
	{
		partial void OnProcessingOtherObject(MolarEnthalpy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarEnthalpy type. Units: [Joule, Mole] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarEnthalpy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarEnthalpy(double value, EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarEnthalpy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this MolarEnthalpy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarEnthalpy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_energyUnits, m_molarAmountUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarEnthalpy instance by converting this instance to the given units
		///</summary>      
        public MolarEnthalpy Convert(EnergyUnits units)
        {
            MolarEnthalpy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarEnthalpy instance by converting this instance to the given units
		///</summary>      
        public MolarEnthalpy Convert(MolarAmountUnits units)
        {
            MolarEnthalpy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarEnthalpy instance by converting this instance to the given units
		///</summary> 
        public MolarEnthalpy Convert(EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits)
        {
            MolarEnthalpy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(molarAmountUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarEnthalpy to the double presision value in units of [Joule, Mole] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarEnthalpy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, Mole] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarEnthalpy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MolarAmountUnits.Mole);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarEnthalpy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarEnthalpy)
            {
                return this.Equals((MolarEnthalpy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarEnthalpy> Members

        /// <summary>
		/// Indicates whether the current MolarEnthalpy object is equal to another MolarEnthalpy object
		/// </summary> 
        public bool Equals(MolarEnthalpy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarEnthalpy> Members

        /// <summary>
		/// Defines a generalized MolarEnthalpy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarEnthalpy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarEnthalpy,double> Members

        public bool IsSame<TTolerance>(MolarEnthalpy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarEnthalpy a, MolarEnthalpy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarEnthalpy a, MolarEnthalpy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarEnthalpy a, MolarEnthalpy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarEnthalpy a, MolarEnthalpy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarEntropy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarEntropy : IEquatable<MolarEntropy>, IComparable<MolarEntropy>, IRoughlyEquatable<MolarEntropy>
	{
		partial void OnProcessingOtherObject(MolarEntropy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TemperatureUnits m_temperatureUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarEntropy type. Units: [Joule, Mole, Kelvin] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarEntropy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarEntropy(double value, EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits, TemperatureUnits temperatureUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
						
			this.m_temperatureUnits = temperatureUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
						
			this.m_temperatureUnits = TemperatureUnits.Kelvin;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TemperatureUnits to the given units value
		///</summary>
        private void Apply(TemperatureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetDerivativesRatio(this.TemperatureUnits, units), -1);
            this.m_temperatureUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarEntropy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this MolarEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TemperatureUnits. Setting another units will automatically change this MolarEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TemperatureUnits TemperatureUnits 
        {
            get { return m_temperatureUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}", m_energyUnits, m_molarAmountUnits, m_temperatureUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarEntropy instance by converting this instance to the given units
		///</summary>      
        public MolarEntropy Convert(EnergyUnits units)
        {
            MolarEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarEntropy instance by converting this instance to the given units
		///</summary>      
        public MolarEntropy Convert(MolarAmountUnits units)
        {
            MolarEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarEntropy instance by converting this instance to the given units
		///</summary>      
        public MolarEntropy Convert(TemperatureUnits units)
        {
            MolarEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarEntropy instance by converting this instance to the given units
		///</summary> 
        public MolarEntropy Convert(EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits, TemperatureUnits temperatureUnits)
        {
            MolarEntropy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(molarAmountUnits);
			
			converted.Apply(temperatureUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarEntropy to the double presision value in units of [Joule, Mole, Kelvin] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarEntropy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, Mole, Kelvin] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarEntropy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MolarAmountUnits.Mole);
			
			physValue.Apply(TemperatureUnits.Kelvin);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarEntropy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarEntropy)
            {
                return this.Equals((MolarEntropy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarEntropy> Members

        /// <summary>
		/// Indicates whether the current MolarEntropy object is equal to another MolarEntropy object
		/// </summary> 
        public bool Equals(MolarEntropy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarEntropy> Members

        /// <summary>
		/// Defines a generalized MolarEntropy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarEntropy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarEntropy,double> Members

        public bool IsSame<TTolerance>(MolarEntropy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarEntropy a, MolarEntropy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarEntropy a, MolarEntropy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarEntropy a, MolarEntropy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarEntropy a, MolarEntropy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarHeatCapacity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarHeatCapacity : IEquatable<MolarHeatCapacity>, IComparable<MolarHeatCapacity>, IRoughlyEquatable<MolarHeatCapacity>
	{
		partial void OnProcessingOtherObject(MolarHeatCapacity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TemperatureUnits m_temperatureUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarHeatCapacity type. Units: [Joule, Mole, Kelvin] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarHeatCapacity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarHeatCapacity(double value, EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits, TemperatureUnits temperatureUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
						
			this.m_temperatureUnits = temperatureUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
						
			this.m_temperatureUnits = TemperatureUnits.Kelvin;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TemperatureUnits to the given units value
		///</summary>
        private void Apply(TemperatureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetDerivativesRatio(this.TemperatureUnits, units), -1);
            this.m_temperatureUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarHeatCapacity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this MolarHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TemperatureUnits. Setting another units will automatically change this MolarHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TemperatureUnits TemperatureUnits 
        {
            get { return m_temperatureUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}", m_energyUnits, m_molarAmountUnits, m_temperatureUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public MolarHeatCapacity Convert(EnergyUnits units)
        {
            MolarHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public MolarHeatCapacity Convert(MolarAmountUnits units)
        {
            MolarHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public MolarHeatCapacity Convert(TemperatureUnits units)
        {
            MolarHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarHeatCapacity instance by converting this instance to the given units
		///</summary> 
        public MolarHeatCapacity Convert(EnergyUnits energyUnits, MolarAmountUnits molarAmountUnits, TemperatureUnits temperatureUnits)
        {
            MolarHeatCapacity converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(molarAmountUnits);
			
			converted.Apply(temperatureUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarHeatCapacity to the double presision value in units of [Joule, Mole, Kelvin] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarHeatCapacity type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, Mole, Kelvin] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarHeatCapacity physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MolarAmountUnits.Mole);
			
			physValue.Apply(TemperatureUnits.Kelvin);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarHeatCapacity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarHeatCapacity)
            {
                return this.Equals((MolarHeatCapacity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarHeatCapacity> Members

        /// <summary>
		/// Indicates whether the current MolarHeatCapacity object is equal to another MolarHeatCapacity object
		/// </summary> 
        public bool Equals(MolarHeatCapacity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarHeatCapacity> Members

        /// <summary>
		/// Defines a generalized MolarHeatCapacity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarHeatCapacity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarHeatCapacity,double> Members

        public bool IsSame<TTolerance>(MolarHeatCapacity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MolarAmountUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarHeatCapacity a, MolarHeatCapacity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarHeatCapacity a, MolarHeatCapacity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarHeatCapacity a, MolarHeatCapacity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarHeatCapacity a, MolarHeatCapacity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarMass
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarMass : IEquatable<MolarMass>, IComparable<MolarMass>, IRoughlyEquatable<MolarMass>
	{
		partial void OnProcessingOtherObject(MolarMass other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarMass type. Units: [KiloGram, Mole] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarMass(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarMass(double value, MassUnits massUnits, MolarAmountUnits molarAmountUnits) : this()
        {
            this.Value = value;
			        				
			this.m_massUnits = massUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_massUnits = MassUnits.KiloGram;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), 1);
            this.m_massUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarMass dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this MolarMass Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarMass Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_massUnits, m_molarAmountUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarMass instance by converting this instance to the given units
		///</summary>      
        public MolarMass Convert(MassUnits units)
        {
            MolarMass converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarMass instance by converting this instance to the given units
		///</summary>      
        public MolarMass Convert(MolarAmountUnits units)
        {
            MolarMass converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarMass instance by converting this instance to the given units
		///</summary> 
        public MolarMass Convert(MassUnits massUnits, MolarAmountUnits molarAmountUnits)
        {
            MolarMass converted = this;
			
			converted.Apply(massUnits);
			
			converted.Apply(molarAmountUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarMass to the double presision value in units of [KiloGram, Mole] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarMass type</param>
		/// <returns>Double presition molar concentration value in units of [KiloGram, Mole] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarMass physValue)
        {			
			
			physValue.Apply(MassUnits.KiloGram);
			
			physValue.Apply(MolarAmountUnits.Mole);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarMass instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarMass)
            {
                return this.Equals((MolarMass)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarMass> Members

        /// <summary>
		/// Indicates whether the current MolarMass object is equal to another MolarMass object
		/// </summary> 
        public bool Equals(MolarMass other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.MolarAmountUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarMass> Members

        /// <summary>
		/// Defines a generalized MolarMass comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarMass other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.MassUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarMass,double> Members

        public bool IsSame<TTolerance>(MolarMass other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.MassUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarMass a, MolarMass b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarMass a, MolarMass b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarMass a, MolarMass b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarMass a, MolarMass b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// MolarVolume
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct MolarVolume : IEquatable<MolarVolume>, IComparable<MolarVolume>, IRoughlyEquatable<MolarVolume>
	{
		partial void OnProcessingOtherObject(MolarVolume other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MolarAmountUnits m_molarAmountUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of MolarVolume type. Units: [Meter, Mole] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public MolarVolume(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public MolarVolume(double value, LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_molarAmountUnits = molarAmountUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_molarAmountUnits = MolarAmountUnits.Mole;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), 3);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MolarAmountUnits to the given units value
		///</summary>
        private void Apply(MolarAmountUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MolarAmountUnits, units), -1);
            this.m_molarAmountUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the MolarVolume dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this MolarVolume Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MolarAmountUnits. Setting another units will automatically change this MolarVolume Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MolarAmountUnits MolarAmountUnits 
        {
            get { return m_molarAmountUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_lengthUnits, m_molarAmountUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new MolarVolume instance by converting this instance to the given units
		///</summary>      
        public MolarVolume Convert(LengthUnits units)
        {
            MolarVolume converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new MolarVolume instance by converting this instance to the given units
		///</summary>      
        public MolarVolume Convert(MolarAmountUnits units)
        {
            MolarVolume converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new MolarVolume instance by converting this instance to the given units
		///</summary> 
        public MolarVolume Convert(LengthUnits lengthUnits, MolarAmountUnits molarAmountUnits)
        {
            MolarVolume converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(molarAmountUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts MolarVolume to the double presision value in units of [Meter, Mole] (default)
		/// </summary>
		/// <param name="physValue">An instance of the MolarVolume type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, Mole] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(MolarVolume physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(MolarAmountUnits.Mole);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this MolarVolume instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is MolarVolume)
            {
                return this.Equals((MolarVolume)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<MolarVolume> Members

        /// <summary>
		/// Indicates whether the current MolarVolume object is equal to another MolarVolume object
		/// </summary> 
        public bool Equals(MolarVolume other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<MolarVolume> Members

        /// <summary>
		/// Defines a generalized MolarVolume comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(MolarVolume other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<MolarVolume,double> Members

        public bool IsSame<TTolerance>(MolarVolume other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.MolarAmountUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(MolarVolume a, MolarVolume b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(MolarVolume a, MolarVolume b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(MolarVolume a, MolarVolume b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(MolarVolume a, MolarVolume b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// SpecificEnergy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct SpecificEnergy : IEquatable<SpecificEnergy>, IComparable<SpecificEnergy>, IRoughlyEquatable<SpecificEnergy>
	{
		partial void OnProcessingOtherObject(SpecificEnergy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of SpecificEnergy type. Units: [Joule, KiloGram] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public SpecificEnergy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public SpecificEnergy(double value, EnergyUnits energyUnits, MassUnits massUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_massUnits = massUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_massUnits = MassUnits.KiloGram;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), -1);
            this.m_massUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the SpecificEnergy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this SpecificEnergy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this SpecificEnergy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_energyUnits, m_massUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new SpecificEnergy instance by converting this instance to the given units
		///</summary>      
        public SpecificEnergy Convert(EnergyUnits units)
        {
            SpecificEnergy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificEnergy instance by converting this instance to the given units
		///</summary>      
        public SpecificEnergy Convert(MassUnits units)
        {
            SpecificEnergy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new SpecificEnergy instance by converting this instance to the given units
		///</summary> 
        public SpecificEnergy Convert(EnergyUnits energyUnits, MassUnits massUnits)
        {
            SpecificEnergy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(massUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts SpecificEnergy to the double presision value in units of [Joule, KiloGram] (default)
		/// </summary>
		/// <param name="physValue">An instance of the SpecificEnergy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, KiloGram] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(SpecificEnergy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MassUnits.KiloGram);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this SpecificEnergy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is SpecificEnergy)
            {
                return this.Equals((SpecificEnergy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<SpecificEnergy> Members

        /// <summary>
		/// Indicates whether the current SpecificEnergy object is equal to another SpecificEnergy object
		/// </summary> 
        public bool Equals(SpecificEnergy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<SpecificEnergy> Members

        /// <summary>
		/// Defines a generalized SpecificEnergy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(SpecificEnergy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<SpecificEnergy,double> Members

        public bool IsSame<TTolerance>(SpecificEnergy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(SpecificEnergy a, SpecificEnergy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(SpecificEnergy a, SpecificEnergy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(SpecificEnergy a, SpecificEnergy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(SpecificEnergy a, SpecificEnergy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// SpecificEnthalpy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct SpecificEnthalpy : IEquatable<SpecificEnthalpy>, IComparable<SpecificEnthalpy>, IRoughlyEquatable<SpecificEnthalpy>
	{
		partial void OnProcessingOtherObject(SpecificEnthalpy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of SpecificEnthalpy type. Units: [Joule, KiloGram] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public SpecificEnthalpy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public SpecificEnthalpy(double value, EnergyUnits energyUnits, MassUnits massUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_massUnits = massUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_massUnits = MassUnits.KiloGram;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), -1);
            this.m_massUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the SpecificEnthalpy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this SpecificEnthalpy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this SpecificEnthalpy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_energyUnits, m_massUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new SpecificEnthalpy instance by converting this instance to the given units
		///</summary>      
        public SpecificEnthalpy Convert(EnergyUnits units)
        {
            SpecificEnthalpy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificEnthalpy instance by converting this instance to the given units
		///</summary>      
        public SpecificEnthalpy Convert(MassUnits units)
        {
            SpecificEnthalpy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new SpecificEnthalpy instance by converting this instance to the given units
		///</summary> 
        public SpecificEnthalpy Convert(EnergyUnits energyUnits, MassUnits massUnits)
        {
            SpecificEnthalpy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(massUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts SpecificEnthalpy to the double presision value in units of [Joule, KiloGram] (default)
		/// </summary>
		/// <param name="physValue">An instance of the SpecificEnthalpy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, KiloGram] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(SpecificEnthalpy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MassUnits.KiloGram);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this SpecificEnthalpy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is SpecificEnthalpy)
            {
                return this.Equals((SpecificEnthalpy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<SpecificEnthalpy> Members

        /// <summary>
		/// Indicates whether the current SpecificEnthalpy object is equal to another SpecificEnthalpy object
		/// </summary> 
        public bool Equals(SpecificEnthalpy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<SpecificEnthalpy> Members

        /// <summary>
		/// Defines a generalized SpecificEnthalpy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(SpecificEnthalpy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<SpecificEnthalpy,double> Members

        public bool IsSame<TTolerance>(SpecificEnthalpy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(SpecificEnthalpy a, SpecificEnthalpy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(SpecificEnthalpy a, SpecificEnthalpy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(SpecificEnthalpy a, SpecificEnthalpy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(SpecificEnthalpy a, SpecificEnthalpy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// SpecificEntropy
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct SpecificEntropy : IEquatable<SpecificEntropy>, IComparable<SpecificEntropy>, IRoughlyEquatable<SpecificEntropy>
	{
		partial void OnProcessingOtherObject(SpecificEntropy other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TemperatureUnits m_temperatureUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of SpecificEntropy type. Units: [Joule, KiloGram, Kelvin] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public SpecificEntropy(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public SpecificEntropy(double value, EnergyUnits energyUnits, MassUnits massUnits, TemperatureUnits temperatureUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_massUnits = massUnits;			
						
			this.m_temperatureUnits = temperatureUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_massUnits = MassUnits.KiloGram;
			
						
			this.m_temperatureUnits = TemperatureUnits.Kelvin;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), -1);
            this.m_massUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TemperatureUnits to the given units value
		///</summary>
        private void Apply(TemperatureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetDerivativesRatio(this.TemperatureUnits, units), -1);
            this.m_temperatureUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the SpecificEntropy dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this SpecificEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this SpecificEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TemperatureUnits. Setting another units will automatically change this SpecificEntropy Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TemperatureUnits TemperatureUnits 
        {
            get { return m_temperatureUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}", m_energyUnits, m_massUnits, m_temperatureUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new SpecificEntropy instance by converting this instance to the given units
		///</summary>      
        public SpecificEntropy Convert(EnergyUnits units)
        {
            SpecificEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificEntropy instance by converting this instance to the given units
		///</summary>      
        public SpecificEntropy Convert(MassUnits units)
        {
            SpecificEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificEntropy instance by converting this instance to the given units
		///</summary>      
        public SpecificEntropy Convert(TemperatureUnits units)
        {
            SpecificEntropy converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new SpecificEntropy instance by converting this instance to the given units
		///</summary> 
        public SpecificEntropy Convert(EnergyUnits energyUnits, MassUnits massUnits, TemperatureUnits temperatureUnits)
        {
            SpecificEntropy converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(massUnits);
			
			converted.Apply(temperatureUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts SpecificEntropy to the double presision value in units of [Joule, KiloGram, Kelvin] (default)
		/// </summary>
		/// <param name="physValue">An instance of the SpecificEntropy type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, KiloGram, Kelvin] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(SpecificEntropy physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MassUnits.KiloGram);
			
			physValue.Apply(TemperatureUnits.Kelvin);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this SpecificEntropy instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is SpecificEntropy)
            {
                return this.Equals((SpecificEntropy)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<SpecificEntropy> Members

        /// <summary>
		/// Indicates whether the current SpecificEntropy object is equal to another SpecificEntropy object
		/// </summary> 
        public bool Equals(SpecificEntropy other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<SpecificEntropy> Members

        /// <summary>
		/// Defines a generalized SpecificEntropy comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(SpecificEntropy other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<SpecificEntropy,double> Members

        public bool IsSame<TTolerance>(SpecificEntropy other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(SpecificEntropy a, SpecificEntropy b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(SpecificEntropy a, SpecificEntropy b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(SpecificEntropy a, SpecificEntropy b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(SpecificEntropy a, SpecificEntropy b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// SpecificHeatCapacity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct SpecificHeatCapacity : IEquatable<SpecificHeatCapacity>, IComparable<SpecificHeatCapacity>, IRoughlyEquatable<SpecificHeatCapacity>
	{
		partial void OnProcessingOtherObject(SpecificHeatCapacity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private MassUnits m_massUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TemperatureUnits m_temperatureUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of SpecificHeatCapacity type. Units: [Joule, KiloGram, Kelvin] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public SpecificHeatCapacity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public SpecificHeatCapacity(double value, EnergyUnits energyUnits, MassUnits massUnits, TemperatureUnits temperatureUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_massUnits = massUnits;			
						
			this.m_temperatureUnits = temperatureUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_massUnits = MassUnits.KiloGram;
			
						
			this.m_temperatureUnits = TemperatureUnits.Kelvin;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the MassUnits to the given units value
		///</summary>
        private void Apply(MassUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.MassUnits, units), -1);
            this.m_massUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TemperatureUnits to the given units value
		///</summary>
        private void Apply(TemperatureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetDerivativesRatio(this.TemperatureUnits, units), -1);
            this.m_temperatureUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the SpecificHeatCapacity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this SpecificHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets MassUnits. Setting another units will automatically change this SpecificHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public MassUnits MassUnits 
        {
            get { return m_massUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TemperatureUnits. Setting another units will automatically change this SpecificHeatCapacity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TemperatureUnits TemperatureUnits 
        {
            get { return m_temperatureUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}", m_energyUnits, m_massUnits, m_temperatureUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new SpecificHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public SpecificHeatCapacity Convert(EnergyUnits units)
        {
            SpecificHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public SpecificHeatCapacity Convert(MassUnits units)
        {
            SpecificHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new SpecificHeatCapacity instance by converting this instance to the given units
		///</summary>      
        public SpecificHeatCapacity Convert(TemperatureUnits units)
        {
            SpecificHeatCapacity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new SpecificHeatCapacity instance by converting this instance to the given units
		///</summary> 
        public SpecificHeatCapacity Convert(EnergyUnits energyUnits, MassUnits massUnits, TemperatureUnits temperatureUnits)
        {
            SpecificHeatCapacity converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(massUnits);
			
			converted.Apply(temperatureUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts SpecificHeatCapacity to the double presision value in units of [Joule, KiloGram, Kelvin] (default)
		/// </summary>
		/// <param name="physValue">An instance of the SpecificHeatCapacity type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, KiloGram, Kelvin] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(SpecificHeatCapacity physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(MassUnits.KiloGram);
			
			physValue.Apply(TemperatureUnits.Kelvin);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this SpecificHeatCapacity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is SpecificHeatCapacity)
            {
                return this.Equals((SpecificHeatCapacity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<SpecificHeatCapacity> Members

        /// <summary>
		/// Indicates whether the current SpecificHeatCapacity object is equal to another SpecificHeatCapacity object
		/// </summary> 
        public bool Equals(SpecificHeatCapacity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<SpecificHeatCapacity> Members

        /// <summary>
		/// Defines a generalized SpecificHeatCapacity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(SpecificHeatCapacity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<SpecificHeatCapacity,double> Members

        public bool IsSame<TTolerance>(SpecificHeatCapacity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.MassUnits);
			
			other.Apply(this.TemperatureUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(SpecificHeatCapacity a, SpecificHeatCapacity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(SpecificHeatCapacity a, SpecificHeatCapacity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(SpecificHeatCapacity a, SpecificHeatCapacity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(SpecificHeatCapacity a, SpecificHeatCapacity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// Surface
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Surface : IEquatable<Surface>, IComparable<Surface>, IRoughlyEquatable<Surface>
	{
		partial void OnProcessingOtherObject(Surface other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of Surface type. Units: [Meter] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public Surface(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public Surface(double value, LengthUnits lengthUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), 2);
            this.m_lengthUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the Surface dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this Surface Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}", m_lengthUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
					
		///<summary>
		/// Creates a new Surface instance by converting this instance to the given units
		///</summary> 
        public Surface Convert(LengthUnits lengthUnits)
        {
            Surface converted = this;
			
			converted.Apply(lengthUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts Surface to the double presision value in units of [Meter] (default)
		/// </summary>
		/// <param name="physValue">An instance of the Surface type</param>
		/// <returns>Double presition molar concentration value in units of [Meter] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(Surface physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this Surface instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Surface)
            {
                return this.Equals((Surface)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<Surface> Members

        /// <summary>
		/// Indicates whether the current Surface object is equal to another Surface object
		/// </summary> 
        public bool Equals(Surface other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<Surface> Members

        /// <summary>
		/// Defines a generalized Surface comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(Surface other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<Surface,double> Members

        public bool IsSame<TTolerance>(Surface other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(Surface a, Surface b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Surface a, Surface b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Surface a, Surface b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Surface a, Surface b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// ThermalConductivity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct ThermalConductivity : IEquatable<ThermalConductivity>, IComparable<ThermalConductivity>, IRoughlyEquatable<ThermalConductivity>
	{
		partial void OnProcessingOtherObject(ThermalConductivity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private EnergyUnits m_energyUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TemperatureUnits m_temperatureUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TimeUnits m_timeUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of ThermalConductivity type. Units: [Joule, Meter, Kelvin, Second] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public ThermalConductivity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public ThermalConductivity(double value, EnergyUnits energyUnits, LengthUnits lengthUnits, TemperatureUnits temperatureUnits, TimeUnits timeUnits) : this()
        {
            this.Value = value;
			        				
			this.m_energyUnits = energyUnits;			
						
			this.m_lengthUnits = lengthUnits;			
						
			this.m_temperatureUnits = temperatureUnits;			
						
			this.m_timeUnits = timeUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_energyUnits = EnergyUnits.Joule;
			
						
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_temperatureUnits = TemperatureUnits.Kelvin;
			
						
			this.m_timeUnits = TimeUnits.Second;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the EnergyUnits to the given units value
		///</summary>
        private void Apply(EnergyUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.EnergyUnits, units), 1);
            this.m_energyUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), -1);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TemperatureUnits to the given units value
		///</summary>
        private void Apply(TemperatureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetDerivativesRatio(this.TemperatureUnits, units), -1);
            this.m_temperatureUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TimeUnits to the given units value
		///</summary>
        private void Apply(TimeUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.TimeUnits, units), -1);
            this.m_timeUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the ThermalConductivity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets EnergyUnits. Setting another units will automatically change this ThermalConductivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public EnergyUnits EnergyUnits 
        {
            get { return m_energyUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this ThermalConductivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TemperatureUnits. Setting another units will automatically change this ThermalConductivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TemperatureUnits TemperatureUnits 
        {
            get { return m_temperatureUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TimeUnits. Setting another units will automatically change this ThermalConductivity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TimeUnits TimeUnits 
        {
            get { return m_timeUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}, {2}, {3}", m_energyUnits, m_lengthUnits, m_temperatureUnits, m_timeUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new ThermalConductivity instance by converting this instance to the given units
		///</summary>      
        public ThermalConductivity Convert(EnergyUnits units)
        {
            ThermalConductivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new ThermalConductivity instance by converting this instance to the given units
		///</summary>      
        public ThermalConductivity Convert(LengthUnits units)
        {
            ThermalConductivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new ThermalConductivity instance by converting this instance to the given units
		///</summary>      
        public ThermalConductivity Convert(TemperatureUnits units)
        {
            ThermalConductivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new ThermalConductivity instance by converting this instance to the given units
		///</summary>      
        public ThermalConductivity Convert(TimeUnits units)
        {
            ThermalConductivity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new ThermalConductivity instance by converting this instance to the given units
		///</summary> 
        public ThermalConductivity Convert(EnergyUnits energyUnits, LengthUnits lengthUnits, TemperatureUnits temperatureUnits, TimeUnits timeUnits)
        {
            ThermalConductivity converted = this;
			
			converted.Apply(energyUnits);
			
			converted.Apply(lengthUnits);
			
			converted.Apply(temperatureUnits);
			
			converted.Apply(timeUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts ThermalConductivity to the double presision value in units of [Joule, Meter, Kelvin, Second] (default)
		/// </summary>
		/// <param name="physValue">An instance of the ThermalConductivity type</param>
		/// <returns>Double presition molar concentration value in units of [Joule, Meter, Kelvin, Second] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(ThermalConductivity physValue)
        {			
			
			physValue.Apply(EnergyUnits.Joule);
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(TemperatureUnits.Kelvin);
			
			physValue.Apply(TimeUnits.Second);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this ThermalConductivity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is ThermalConductivity)
            {
                return this.Equals((ThermalConductivity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<ThermalConductivity> Members

        /// <summary>
		/// Indicates whether the current ThermalConductivity object is equal to another ThermalConductivity object
		/// </summary> 
        public bool Equals(ThermalConductivity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TemperatureUnits);
			
			other.Apply(this.TimeUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<ThermalConductivity> Members

        /// <summary>
		/// Defines a generalized ThermalConductivity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(ThermalConductivity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TemperatureUnits);
			
			other.Apply(this.TimeUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<ThermalConductivity,double> Members

        public bool IsSame<TTolerance>(ThermalConductivity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.EnergyUnits);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TemperatureUnits);
			
			other.Apply(this.TimeUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(ThermalConductivity a, ThermalConductivity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(ThermalConductivity a, ThermalConductivity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(ThermalConductivity a, ThermalConductivity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(ThermalConductivity a, ThermalConductivity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// Velocity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Velocity : IEquatable<Velocity>, IComparable<Velocity>, IRoughlyEquatable<Velocity>
	{
		partial void OnProcessingOtherObject(Velocity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TimeUnits m_timeUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of Velocity type. Units: [Meter, Second] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public Velocity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public Velocity(double value, LengthUnits lengthUnits, TimeUnits timeUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
						
			this.m_timeUnits = timeUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
						
			this.m_timeUnits = TimeUnits.Second;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), 1);
            this.m_lengthUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TimeUnits to the given units value
		///</summary>
        private void Apply(TimeUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.TimeUnits, units), -1);
            this.m_timeUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the Velocity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this Velocity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TimeUnits. Setting another units will automatically change this Velocity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TimeUnits TimeUnits 
        {
            get { return m_timeUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_lengthUnits, m_timeUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new Velocity instance by converting this instance to the given units
		///</summary>      
        public Velocity Convert(LengthUnits units)
        {
            Velocity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new Velocity instance by converting this instance to the given units
		///</summary>      
        public Velocity Convert(TimeUnits units)
        {
            Velocity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new Velocity instance by converting this instance to the given units
		///</summary> 
        public Velocity Convert(LengthUnits lengthUnits, TimeUnits timeUnits)
        {
            Velocity converted = this;
			
			converted.Apply(lengthUnits);
			
			converted.Apply(timeUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts Velocity to the double presision value in units of [Meter, Second] (default)
		/// </summary>
		/// <param name="physValue">An instance of the Velocity type</param>
		/// <returns>Double presition molar concentration value in units of [Meter, Second] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(Velocity physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			
			physValue.Apply(TimeUnits.Second);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this Velocity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Velocity)
            {
                return this.Equals((Velocity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<Velocity> Members

        /// <summary>
		/// Indicates whether the current Velocity object is equal to another Velocity object
		/// </summary> 
        public bool Equals(Velocity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<Velocity> Members

        /// <summary>
		/// Defines a generalized Velocity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(Velocity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<Velocity,double> Members

        public bool IsSame<TTolerance>(Velocity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
			
			other.Apply(this.TimeUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(Velocity a, Velocity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Velocity a, Velocity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Velocity a, Velocity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Velocity a, Velocity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// Viscosity
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Viscosity : IEquatable<Viscosity>, IComparable<Viscosity>, IRoughlyEquatable<Viscosity>
	{
		partial void OnProcessingOtherObject(Viscosity other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private PressureUnits m_pressureUnits;     
               
           
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private TimeUnits m_timeUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of Viscosity type. Units: [Pascal, Second] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public Viscosity(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public Viscosity(double value, PressureUnits pressureUnits, TimeUnits timeUnits) : this()
        {
            this.Value = value;
			        				
			this.m_pressureUnits = pressureUnits;			
						
			this.m_timeUnits = timeUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_pressureUnits = PressureUnits.Pascal;
			
						
			this.m_timeUnits = TimeUnits.Second;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the PressureUnits to the given units value
		///</summary>
        private void Apply(PressureUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.PressureUnits, units), 1);
            this.m_pressureUnits = units;
        }
		
				
		///<summary>
		/// Converts this instance Value property and sets the TimeUnits to the given units value
		///</summary>
        private void Apply(TimeUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.TimeUnits, units), 1);
            this.m_timeUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the Viscosity dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets PressureUnits. Setting another units will automatically change this Viscosity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public PressureUnits PressureUnits 
        {
            get { return m_pressureUnits; }
            set { Apply(value); }
        }     
               
           
        ///<summary>
		/// Gets or sets TimeUnits. Setting another units will automatically change this Viscosity Value-property.
		///</summary>
		[DebuggerHidden()] 
        public TimeUnits TimeUnits 
        {
            get { return m_timeUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}, {1}", m_pressureUnits, m_timeUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
				///<summary>
		/// Creates a new Viscosity instance by converting this instance to the given units
		///</summary>      
        public Viscosity Convert(PressureUnits units)
        {
            Viscosity converted = this;
            converted.Apply(units);
            return converted;
        }
			
				///<summary>
		/// Creates a new Viscosity instance by converting this instance to the given units
		///</summary>      
        public Viscosity Convert(TimeUnits units)
        {
            Viscosity converted = this;
            converted.Apply(units);
            return converted;
        }
			
					
		///<summary>
		/// Creates a new Viscosity instance by converting this instance to the given units
		///</summary> 
        public Viscosity Convert(PressureUnits pressureUnits, TimeUnits timeUnits)
        {
            Viscosity converted = this;
			
			converted.Apply(pressureUnits);
			
			converted.Apply(timeUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts Viscosity to the double presision value in units of [Pascal, Second] (default)
		/// </summary>
		/// <param name="physValue">An instance of the Viscosity type</param>
		/// <returns>Double presition molar concentration value in units of [Pascal, Second] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(Viscosity physValue)
        {			
			
			physValue.Apply(PressureUnits.Pascal);
			
			physValue.Apply(TimeUnits.Second);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this Viscosity instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Viscosity)
            {
                return this.Equals((Viscosity)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<Viscosity> Members

        /// <summary>
		/// Indicates whether the current Viscosity object is equal to another Viscosity object
		/// </summary> 
        public bool Equals(Viscosity other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.PressureUnits);
			
			other.Apply(this.TimeUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<Viscosity> Members

        /// <summary>
		/// Defines a generalized Viscosity comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(Viscosity other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.PressureUnits);
			
			other.Apply(this.TimeUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<Viscosity,double> Members

        public bool IsSame<TTolerance>(Viscosity other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.PressureUnits);
			
			other.Apply(this.TimeUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(Viscosity a, Viscosity b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Viscosity a, Viscosity b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Viscosity a, Viscosity b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Viscosity a, Viscosity b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	///<summary>
	/// Volume
	///</summary>
	[Serializable]
	[DebuggerDisplay("{Value} {Units}")]
	public partial struct Volume : IEquatable<Volume>, IComparable<Volume>, IRoughlyEquatable<Volume>
	{
		partial void OnProcessingOtherObject(Volume other);
	
		#region Private Fields
		  
        [DebuggerBrowsable(DebuggerBrowsableState.Never)]
        private LengthUnits m_lengthUnits;     
               
            
		 
                       
        #endregion
					
		#region Constructors

        ///<summary>
		/// Creates an instance of Volume type. Units: [Meter] (default)
		///</summary>
		/// <param name="value">Molar concentration value. Units: [Mole, Meter]</param>
		[DebuggerHidden()]
        public Volume(double value) : this() { this.Initialize(value); }

        ///<summary>
		/// Creates an instance of MolarConcentration type applying the given units
		///</summary>
		[DebuggerHidden()]
        public Volume(double value, LengthUnits lengthUnits) : this()
        {
            this.Value = value;
			        				
			this.m_lengthUnits = lengthUnits;			
			                
        }
        
        #endregion 
					
		#region Private Methods
		
		private void Initialize(double value)
        {
            this.Value = value;
            
            			
			this.m_lengthUnits = LengthUnits.Meter;
			
			        
        } 
		
				
		///<summary>
		/// Converts this instance Value property and sets the LengthUnits to the given units value
		///</summary>
        private void Apply(LengthUnits units)
        {
            Value *= Math.Pow( Nature.Units.GetConversionFactor(this.LengthUnits, units), 3);
            this.m_lengthUnits = units;
        }
		
				
		#endregion Private Methods
					
		#region Public Properties
		
		///<summary>
		/// Gets or sets the Volume dimensional value
		///</summary>
        public double Value { get; set; }
		
		  
        ///<summary>
		/// Gets or sets LengthUnits. Setting another units will automatically change this Volume Value-property.
		///</summary>
		[DebuggerHidden()] 
        public LengthUnits LengthUnits 
        {
            get { return m_lengthUnits; }
            set { Apply(value); }
        }     
               
            
			
		   
			
		///<summary>
		/// Gets the coma separated list of units for this MolarHeatCapacity
		///</summary>
        public string Units
        {
            get { return string.Format("{0}", m_lengthUnits); }
        }
		
		#endregion Public Properties
		
		#region Convert Methods
		
					
		///<summary>
		/// Creates a new Volume instance by converting this instance to the given units
		///</summary> 
        public Volume Convert(LengthUnits lengthUnits)
        {
            Volume converted = this;
			
			converted.Apply(lengthUnits);
			                                
            return converted;            
        }
			
		/// <summary>
		/// Implicitly converts Volume to the double presision value in units of [Meter] (default)
		/// </summary>
		/// <param name="physValue">An instance of the Volume type</param>
		/// <returns>Double presition molar concentration value in units of [Meter] (default)</returns>
		[DebuggerHidden()]
		public static implicit operator double(Volume physValue)
        {			
			
			physValue.Apply(LengthUnits.Meter);
			        
            return physValue.Value;
        }
		
		#endregion Convert Methods
		
		#region System.Object Overrides

        ///<summary>
		/// Returns the hash code for this Volume instance.
		///</summary>
		[DebuggerHidden()]
		public override int GetHashCode()
        {
            double value = (this);
            return value.GetHashCode();
        }

		///<summary>
		/// Converts this object to string
		///</summary>
		[DebuggerHidden()]
		public override string ToString()
        {
            return string.Format("{0} {1}", Value, Units);
        }

		///<summary>
		/// Indicates whether this MolarHeatCapacity instance and the specified object are equal.
		///</summary>
		[DebuggerHidden()]
		public override bool Equals(object obj)
        {
            if (obj is Volume)
            {
                return this.Equals((Volume)obj);
            }
            return base.Equals(obj);
        }


        #endregion System.Object Overrides

		#region IEquatable<Volume> Members

        /// <summary>
		/// Indicates whether the current Volume object is equal to another Volume object
		/// </summary> 
        public bool Equals(Volume other)
        {
			OnProcessingOtherObject(other);
			
			other.Apply(this.LengthUnits);
			                                
            return (this.Value == other.Value);
        }

        #endregion

		#region IComparable<Volume> Members

        /// <summary>
		/// Defines a generalized Volume comparison method for ordering instances.
		/// </summary> 
        public int CompareTo(Volume other)
        {
			OnProcessingOtherObject(other);
        	
			other.Apply(this.LengthUnits);
						
            return this.Value.CompareTo(other.Value);
        }

        #endregion

		#region IRoughlyEquatable<Volume,double> Members

        public bool IsSame<TTolerance>(Volume other, TTolerance tolerance) where TTolerance : ITolerance<double>
        {
			OnProcessingOtherObject(other);
            
			other.Apply(this.LengthUnits);
						
            return tolerance.AreSame(this.Value, other.Value);
        }

        #endregion

		#region Comparison Operators
                
		[DebuggerHidden()]
		public static bool operator ==(Volume a, Volume b) { return a.Equals(b); }

		[DebuggerHidden()]
        public static bool operator !=(Volume a, Volume b) { return (!a.Equals(b)); }

		[DebuggerHidden()]
        public static bool operator >(Volume a, Volume b) { return a.CompareTo(b) > 0; }

		[DebuggerHidden()]
        public static bool operator <(Volume a, Volume b) { return a.CompareTo(b) < 0; }    

        #endregion // Comparison Operators    
	}
	
		
	#endregion Composite Physical Quantities

}
	